Changelog images via CLI (#3373)

This commit is contained in:
Kalle
2026-08-29 13:18:43 +03:00
committed by GitHub
parent d0f5d037b5
commit e2d0437d3e
24 changed files with 899 additions and 9 deletions

View File

@@ -74,6 +74,14 @@ OG images are the preview images shown when a page is shared on Discord, Bluesky
New pages need to be added to `OG_IMAGE_PAGES` and to `PAGE_COLORS` on the preview page. Routes opt in via `image: ogPageImage("<page>")` given to `metaTags`.
## Generate the update changelog image
The image posted on social media on update day is built from the entry files in `changelog/`.
1) Every commit with a user facing change adds one `changelog/YYYY-MM-DD-<slug>.md` per change. Frontmatter is `navItem` (optional, must be one of `OG_IMAGE_PAGES`, omitted = sendou.ink logo) and `type` (`feature` or `bug`). The body is a one line headline, optionally followed by a markdown bullet list for a bigger release. Entries are never deleted, they are the update history.
2) Preview and tweak the graphic on the `/admin/changelog-image` page (dev only). Without a `?since=<sha>` it renders every entry ever committed.
3) With the dev server running, `pnpm run changelog:image <sha-of-previous-update-commit>` writes `scripts/output/update-<date>.png` from the entries added since that commit, copies the image to the clipboard.
## Add a new translation string
1) Decide on where the translation should go. Either `common.json` which is available in every route by default or a feature specific one such as `builds.json`