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.
[News] with the title of your post.YYYY-MM-DD. Leave empty for today.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.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.
_posts/news/<date>-<slug>.md – the English post_posts/ja/news/<date>-<slug>.md – the Japanese version, machine
translated by DeepLimages/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.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.
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
_posts/news/... and the matching
file in _posts/ja/news/) and open a pull request.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.
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.
@mentions and #123 issue references in the body; they are GitHub
features and will show up as plain text on the website.**bold**, *italic*, [text](https://...) for links,
- item for bullet lists..github/ISSUE_TEMPLATE/news-post.yml – the form..github/workflows/news-post.yml – runs when an issue with the news-post
label is opened or edited by a repository collaborator. It calls the script
below, downsizes attached photos to 1600 px (downsize_images.py), commits to a branch
news/issue-<n>, opens or updates a pull request, then calls the preview
workflow..github/workflows/news-preview.yml – builds the site from a
news/issue-<n> branch, screenshots the post with headless Chrome, and
posts the screenshots on the pull request, deleting the previous Preview
comment first. Besides being called by the workflow above, it runs on
every push to a news/issue-<n> branch, so editing the post files on the
pull request also refreshes the screenshots. The screenshots are stored on
the orphan branch previews (one folder per issue and run) so they never
end up in the site; that branch can be deleted and will be recreated..github/scripts/issue_to_post.py – parses the form, downloads attached
images into images/news/<slug>/, translates with DeepL, and writes the two
post files. It records issue: <n> in the front matter so edits replace
the earlier files instead of duplicating them. For Paper posts it also adds
the paper to _data/publications.yml from the DOI in the Link field
(metadata from the Crossref API), skipping papers that are already listed._data/news_types.yml – the list of post types and their Japanese labels.
If you change it, change the Type dropdown in the form as well._includes/news-list.html, _layouts/news.html, _sass/_news.scss,
js/news.js – the News page, post layout, styles, and the filter / search /
sort behaviour.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.news-post label must exist (it does; recreate it if deleted).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.
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).