Standalone Astro/Starlight documentation site for OmniRoute. English content is imported at build time from a pinned upstream submodule; reviewed translations and site-owned pages are managed locally. Read this before editing or building.
- Package
@hagicode/omniroute-docs(private). Built with Astro + Starlight; shared shell from@hagicode/hagilight/@hagicode/hagilight-starlightpinned to an exact published version inpackage.json(the current compatibility boundary).
git submodule update --init vendor/OmniRoute # required before first build
pnpm install
pnpm run dev # import:upstream + astro dev
pnpm run build # import:upstream + astro build
pnpm run preview # serve the production build
pnpm run check # import:upstream + astro check
pnpm run test:fast # no-build first pass; delegates to pnpm run check
pnpm run check:translation-reviews # verify review metadata
pnpm run update:translation-reviews --reviewed # refresh review metadata
pnpm test # node --test test/*.test.mjsBefore a pull request: pnpm run check, pnpm run build, pnpm test.
vendor/OmniRoute/— git submodule pinned at revisionrelease/v3.8.51. The only article source. The importer publishes every English Markdown under upstreamdocs/(excludingdocs/i18n/translated subdirs) plus the rootREADME.mdas the home page; canonical slugs preserved byscripts/upstream-topics.mjs(seedocs/upstream-route-map.md).scripts/import-english.mjs→english-source.mjs(import/validate/rewrite/copy),upstream-topics.mjs(route map),check-translation-baselines.mjs/update-translation-reviews.mjs(review metadata insrc/content/upstream-translation-reviews.json).src/— site-owned Starlight config (content.config.ts),components/,content/,i18n/,lib/,pages/,styles/. Generated pages and assets land undersrc/content/docs/and are Git-ignored.test/—built-pages.test.mjs,english-source.test.mjs,hagilight-discovery.test.mjs(robots, sitemap and RSS indist/),locale-navigation.test.mjs,workflows.test.mjs..github/gh-pages/—esa.jsonc,wrangler.jsoncdeployment configs.
- Do not edit generated
src/content/docs/pages; import upstream instead. An absent checkout, broken reference, or changed generated page fails the build rather than publishing unreviewed content. - To update content: bump the submodule pin, read the selected English docs and their translations, then
pnpm run update:translation-reviewsto refreshsrc/content/upstream-translation-reviews.json(new revision, SHA-256 of English files with real translations, and actual<site-locale>/<English-source-path>pairs — never English fallbacks). Commit the pin and review metadata together. pnpm run check:translation-reviewsrejects changed or missing review relationships.- Canonical URL
https://omniroute.hagicode.com(publishing a build does not activate DNS). English feed at/rss.xmland per-language feeds at/rss.<locale>.xml. - Hagilight owns header, locale chooser, footer links, content-width control, article introduction, and the optional campaign banner; OmniRoute Docs keeps fallback-aware title/content wrappers and English-source links. Analytics: GA
G-EN03FMT2Q4, 51LAL6b88a5yK4h2Xnci(51LA screen recording enabled) — review privacy/consent before publishing.
pnpm run test:fastdoes not validate built pages or production output; runpnpm testagainst a completed build (pnpm run buildfirst) since some suites assert on built output.
- CI (
.github/workflows/docs-ci.yml) runs the same check/build/test gate on pull requests, pushes tomainand a weekly schedule, on Node.js 22 (the deploy workflow also uses 22). docs-deploy-gh-pages.ymlpublishes a successfulmainbuild, assemblingdist/,esa.jsonc, andwrangler.jsoncat thegh-pagesbranch root. The branch is force-pushed as a fresh orphan commit each time with Jekyll disabled (force_orphan,enable_jekyll: false), so it keeps no history; the payload is built in.deploy/gh-pagesand uploaded with hidden files included. Thegh-pagesbranch is a publication artifact only; hosting and custom-domain activation are separate operations.
- The repository uses pnpm, pinned in
package.jsonpackageManager. Runcorepack enableonce, thenpnpm install.pnpm-lock.yamlis the only lockfile; do not commitpackage-lock.json. - Settings live in
pnpm-workspace.yaml.allowBuildslists the dependencies whose install scripts may run (reviewed individually,falsemeans reviewed and denied); review any new dependency that has an install script and add it there. - A local registry mirror belongs in
~/.npmrconly. Never commit aregistry=line or a mirror URL;pnpm run check:registry(also run in CI) fails on any non-registry.npmjs.orgtarballin the lockfile and on mirror hosts in tracked files. - Undeclared imports fail under pnpm's strict layout: declare the package instead of hoisting it.