This website¶
The guide is built with MkDocs and Material for MkDocs, in English and Traditional Chinese, and published to GitHub Pages by GitHub Actions.
pixi run -e docs docs-serve # live preview on http://127.0.0.1:8765/amfp-enhanced/
pixi run -e docs docs-build # strict build into site/ (what CI runs)
pixi run -e docs docs-check # build, then check every local link and anchor
The docs environment holds only the documentation tools (MkDocs, the i18n and macros plugins,
mkdocstrings, Doxygen, Rust); it does not need the game's compilers or libraries.
Where things are¶
| Path | What it is |
|---|---|
mkdocs.yml |
Site settings, navigation, languages. |
guide/ |
The pages. page.md is English, page.zh-Hant.md its Traditional Chinese twin. |
guide/stylesheets/amfp.css |
The look: soot and brass (dark) and parchment (light), fonts. |
guide_overrides/partials/header.html |
Material's header, with the site name made a link to the home page. |
guide/assets/img/hero-*.svg |
The home page banner, dark and light: our own drawing, no game art. |
guide/javascripts/compare.js |
The before / after slider. |
guide/assets/shots/ |
Screenshots, made by pixi run docs-shots (Screenshots). |
tools/docs/build_api.py |
Builds the C++ (Doxygen) and Rust (rustdoc) reference. |
tools/docs/hooks.py |
Copies that reference into the site under api/. |
tools/docs/macros.py |
The shot and compare figures. |
tools/docs/check_links.py |
The link check. |
tools/docs/check_cjk_spacing.py |
The Chinese spacing check (no stray spaces next to Chinese text). |
.github/workflows/docs.yml |
Builds on every pull request; builds and publishes from main. |
The API reference¶
- C++: Doxygen over the headers this fork added (those whose first comment starts with
AMFP-2026:), plus the Rust library's C header. A filter turns each file's header comment into its description; the sources are not changed. - Rust:
cargo docfor thehpl-cjk-textcrate. - Python: mkdocstrings reads
tools/,tools/dev/and the text module's type stub (crates/hpl-cjk-text-py/hpl_cjk_text.pyi) without importing or building anything.
Translating¶
Every page has a Traditional Chinese twin next to it. Rules for translators are in
guide/TRANSLATING.md (not part of the site): keep file names and links, never translate code,
keep the figures' ids, write natural Taiwanese Mandarin rather than word for word. A page
without a twin falls back to English.
Publishing¶
.github/workflows/docs.yml builds the site on every pull request that touches it (strict,
with the link check) and uploads the result as an artifact to look at. On main it also
publishes to GitHub Pages. The repository's Settings > Pages > Source must be set to
GitHub Actions once.