Acceptance of the docs on both sites: 320 dead links, and a new check in the build
All 680 expected routes, images, RSS feeds, and sitemaps matched across our overseas and mainland China website builds—yet a full audit uncovered 320 live links pointing to 404. Here is how two individually valid rules clashed, the one-line menu fix plus site-wide HTML/CSS link checker, and a bonus missing font file caught along the way.
Both halves of commit 9952139: disabling VitePress's built-in switcher on top, and enforcing site-wide link verification in check-docs.mjs below.On this page
Obituary builds two complete static websites—GitHub Pages overseas and a mainland China mirror—housing ten-language user docs, 270 agent guides, bilingual developer docs, and a bilingual engineering blog.
On 23 November we ran a full end-to-end audit of both builds off the 1.7.0 release commit. Every expected route, image, RSS feed, and sitemap existed—yet we hit one hard blocker: 320 internal links across the two builds pointed straight to 404.
How two "correct" rules manufactured 320 broken links
The root cause was an invisible mismatch between two parts of the build:
check-docs.mjs explicitly asserted that developer docs exist only in Chinese and English, forbidding the other eight locale folders.
VitePress's built-in language switcher knew nothing about that rule and printed all ten locale links on all 20 developer doc pages (10 Chinese + 10 English)—linking pages like docs/dev/agent-integration.html to eight nonexistent paths (/docs/zh-TW/dev/..., Japanese, Korean, Spanish, French, German, Portuguese, Russian).
20 pages × 8 missing locales × 2 builds = 320 dead links. Both checks passed on their own because nothing actually crawled the built HTML output.
In isolated temp directories we also downloaded the released 1.7.0 Windows and Linux archives, verified SHA-256, and ran 15 CLI spot-checks covering init, uninstall --dry-run/--yes preserving user data, platform boundaries, and default values (claude, retention_days=7, update.check=true, proposals.mode=off).
One line to fix the menu, plus a permanent build-time crawler
Commit 9952139 fixed the menu in a single line: blanking VitePress's built-in locale label so our custom LanguageMenu takes over—listing all ten locales on user docs and only Chinese and English on developer docs.
To keep regressions from ever shipping again, the same commit wired site/scripts/check-links.mjs right after assemble.mjs:
Crawls every <a>, hreflang, and canonical in every HTML file of both dist/ and dist-cn/.
Flags missing files/pages and broken # fragment anchors.
Fails the entire build on a single dead link, listing every source page and offending href.
With unit tests covering the checker itself, dead links fell from 320 to 0.
Both halves of commit 9952139: disabling VitePress's built-in switcher on top, and enforcing site-wide link verification in check-docs.mjs below.
Bonus catch: a font file missing from both builds
A non-blocking Vite warning flagged /fonts/noto-serif-sc-subset.woff2: three lazy-loaded stylesheets for optional desktop window themes referenced it, yet the file never landed in dist/. Because default views never loaded those themes, visitors didn't notice—still a live 404 waiting to happen.
We pointed the stylesheets directly at the single canonical font inside cmd/obit-gui/frontend/public/fonts, copied OFL-NotoSerifSC.txt during assembly, and extended check-links.mjs to crawl every CSS url(). Against the old build it caught all 3 broken references; after the fix, both builds reported 0.
Post-deploy checks hit all 506 sitemap routes across both origins: every route returned HTTP 200 with byte-identical SHA-256 hashes, the 204,168-byte font/woff2 and 4,543-byte license served cleanly, and headless browser spot-checks confirmed images and code blocks across 22 pages. One honest boundary remains: identical byte hashes from our test machine cannot distinguish proxied overseas traffic from local Chinese ISP routing, so live checks prove deploy health and exact response bodies rather than every regional network path.