RIKEN iTHEMSMathematical Social Science Team

Add a News Post

The News page (https://ithems-math-soc.github.io/news/) is for short news items: a new paper, a talk, a workshop report, a visitor, a new member, a seminar announcement, an award, media coverage, a job opening, or other news such as a new grant, project, or collaboration.

You do not need git or a local copy of the website to post. Everything is done on GitHub in your browser.

Posting (everyone)

  1. Open the News post form: https://github.com/ithems-math-soc/ithems-math-soc.github.io/issues/new?template=news-post.yml (or go to the repository, click Issues → New issue → News post).
  2. In the title box, replace [News] with the title of your post.
  3. Fill in the fields:
    • Type (required): pick one from the list. It is shown as a coloured tag on the News page and can be used to filter posts. If nothing fits (for example a new grant, a new project, or a new collaboration), choose Others.
    • Date: YYYY-MM-DD. Leave empty for today.
    • Author: your name as it should appear. Optional.
    • Link / Link label: an optional URL (paper, seminar page, …) shown as a button at the end of the post, and the text for that button. For a Paper, put the DOI link here (https://doi.org/...): the paper is looked up on Crossref and added to the Publications page in the same pull request, unless it is already listed. Check the generated entry in _data/publications.yml; no Japanese version is needed.
    • Body (required): the post itself, in English, written in Markdown. The first paragraph is used as the summary on the News page. To add photos, drag and drop the image files into the Body box; GitHub uploads them and inserts a link automatically. The first photo in the post is used as its thumbnail on the News page. Photos on consecutive lines are shown side by side on the post page; leave a blank line between photos to show them one below the other.
  4. Click Submit new issue.

Within a few minutes a bot comments on your issue with a link to a pull request that contains your post, and posts screenshots of the finished post (English and Japanese) on that pull request. Nothing is published yet.

Reviewing and publishing (any team member)

  1. Open the pull request linked from the issue. The Preview comment shows how the post will look, in English and in Japanese, plus the News page. No local build is needed.
  2. If something needs a fix, click Files changed. You will see:
    • _posts/news/<date>-<slug>.md – the English post
    • _posts/ja/news/<date>-<slug>.md – the Japanese version, machine translated by DeepL
    • images/news/<slug>/ – any photos On a file, click the … menu → Edit file, change the text, and Commit changes to the same branch (see Editing the Japanese text below). A few minutes later the old Preview comment is replaced by a new one with screenshots of the edited post. Bigger changes are easier by editing the original issue, which regenerates everything.
  3. Click Merge pull request → Confirm merge. The website rebuilds in a few minutes and the post appears on the News page. The issue closes automatically.

Editing the Japanese text

The Japanese file (_posts/ja/news/<date>-<slug>.md) is an ordinary text file and can be edited at any time, before or after publishing. When you do, also change the line

machine_translation: true

near the top of the file to machine_translation: false. This does two things:

Without that change, an edit to the issue regenerates the Japanese file and your corrections are lost.

Changing a post

Before the pull request is merged: edit the issue (title, fields, or body). The pull request is updated automatically. This regenerates the post files, so hand edits made on the pull request are overwritten, except for a Japanese file marked machine_translation: false.

After it is merged: either

To change the date of a post without touching the issue, edit the date: line near the top of both files (English and Japanese). The date in the file name does not need to change; the date: line wins. If the issue is edited later, the date comes from the issue’s Date field again.

Deleting a post

Delete both files (_posts/news/<date>-<slug>.md and _posts/ja/news/<date>-<slug>.md) and the folder images/news/<slug>/ if it exists, then open a pull request. On GitHub: open the file, click … → Delete file.

Writing tips

For maintainers

How it works

One-time setup

  1. Settings → Actions → General → Workflow permissions: tick Allow GitHub Actions to create and approve pull requests.
  2. Settings → Secrets and variables → Actions → New repository secret: name DEEPL_API_KEY, value: an API key from a DeepL account (https://www.deepl.com/pro-api — the free plan is enough). Without this secret, posts are still created, but in English only.
  3. The news-post label must exist (it does; recreate it if deleted).

Switching to publishing without review

When the team is comfortable with the flow, the pull request step can be replaced by a direct push to main: in .github/workflows/news-post.yml, check out main instead of news/issue-<n>, push to main, and drop the “Open or update the pull request” step.

Post file format

If you ever need to write a post by hand, this is the format the script produces:

---
layout: news
title: "New paper published in PNAS"
date: 2026-10-07                # shown on the page; overrides the file name
type: Paper
lang: en
categories: news
author: "Your Name"              # optional
link: "https://doi.org/..."     # optional
link_label: "Read the paper"    # optional
translation_url: /ja/news/new-paper-published-in-pnas/   # if a Japanese file exists
---

Body text in Markdown.

The Japanese file lives at the same name under _posts/ja/news/ and has lang: ja, categories: [ja, news], site_title: 数理社会科学チーム, translation_url pointing back to the English post, and machine_translation: true (set to false once a person has edited it).