9b689b2885
Build · Site / build (push) Successful in 8s
Tests · Integration / integration (pull_request) Successful in 1m48s
Build · Site / build (pull_request) Successful in 7s
Tests · UI / test (pull_request) Successful in 3m20s
Tests · Go / test (pull_request) Successful in 2m11s
markdown-it-mathjax3 renders each formula as a visible SVG plus a MathML twin (<mjx-assistive-mml>) for screen readers, hidden via CSS scoped to a per-container #mjx-<id> selector. In the static build the containers carry no id, so that scoped rule matches nothing and the twin renders as a second, oversized (theme-monospaced) copy of every formula, in every browser. Add a global visually-hidden rule for mjx-assistive-mml in the theme CSS: the twin stays in the DOM for assistive tech but is removed from view and from layout.
Galaxy project site
The public project site — an overview today, documentation as it grows.
Built with VitePress and served as static files
at the root (/) of the single-origin deployment; the game UI lives
under /game/ (see tools/dev-deploy/Caddyfile.dev).
Layout
index.md,ru/index.md— per-locale home pages..vitepress/config.ts— site config: locales (English + Russian, with the built-in language switcher), LaTeX math (math: true), and the two-column navigation (left sidebar = chapters, right outline = on-this-page)..vitepress/theme/— the default theme without bundled fonts, plus a minimal monospace type stack incustom.css.
Authoring
- Add a page as Markdown and register it in the
sidebarof each locale in.vitepress/config.ts. - Localised content mirrors the English tree under
ru/. - Game rules (
ru/rules.md) are the one exception to English-first: the Russian page is the authoritative source (ported from the formergame/rules.txt), and the Englishrules.mdis its mirror/translation. Keep the two in sync as withFUNCTIONAL.md/FUNCTIONAL_ru.md, but with Russian leading. - Math uses LaTeX: inline
$E = mc^2$, block$$ … $$. - Link to the game with the root-relative
/game/path so the build stays domain-agnostic (no hard-coded host).
Commands
pnpm install
pnpm dev # local dev server
pnpm build # static build into .vitepress/dist
pnpm preview # preview the build
The dev and prod deploys build the site via
make -C tools/dev-deploy seed-site and the dev-deploy /
prod-build workflows.