7.2 KiB
GitHub Pages Language And GEO Workflow
Language: English | 简体中文
This workflow records the public documentation-site gate for website/. It is intentionally separate from runtime plugin i18n and from Slidev export acceptance.
Current Contract
The website publishes one complete language surface and one partial language surface:
- English is the canonical complete documentation surface under
https://jacobinwwey.github.io/obsidian-NotEMD/docs/.... - Simplified Chinese publishes the homepage plus the reviewed critical path: intro, installation, quick start, configuration, provider overview, AI knowledge pillar, and FAQ.
- Docusaurus may still generate untranslated zh-CN fallback docs, but those pages must be
noindex,follow, excluded from the zh-CN sitemap, hidden from zh-CN sidebar/paginator traversal, and excluded from hreflang alternates. - Locale switching from an unpublished zh-CN fallback route must go to a real route: zh-CN root for Chinese, canonical English for English.
llms.txtmust describe the same language boundary so answer engines do not infer full multilingual coverage.- Public GEO/product-positioning changes must update the visible GitHub Pages homepage, homepage JSON-LD,
llms.txt, and build-audit expectations in the same change. Updating only maintainer notes is not enough.
Implemented Gate
The blocking gate is:
cd website
npm run build
npm run audit:build
npm run audit:build executes website/scripts/audit-build.cjs. The script checks built output and source contract points:
- root pages exist:
build/index.htmlandbuild/zh-CN/index.html; - root pages have the expected
lang, canonical URL, and WebPage JSON-LD URL; - every published zh-CN source file exists and every localized zh-CN doc file is declared in
publishedLanguageScopeData.mjs; - critical zh-CN doc paths are published;
- published zh-CN docs do not emit
noindex,follow; - unpublished zh-CN fallback docs emit
noindex,followand do not emit alternates; - English docs expose zh-CN alternates only when the zh-CN translation is published;
- published zh-CN docs do not link to unpublished zh-CN fallback docs;
- sitemap output includes canonical English docs, includes published zh-CN docs, and excludes unpublished zh-CN fallback docs;
llms.txtrecords the current language scope;- provider docs contain setup, endpoint/auth, model discovery, troubleshooting, and use-case sections;
GEO_ROADMAP.mdand the measurement logs mention 2026-06-22 baseline evidence plus 2026-06-24 homepage sync evidence, Search Console, AI visibility, and sitemap evidence.- the homepage exposes source-backed product facts, an answer-engine source map, the
llms.txtlink, the current release version, and the partial zh-CN language boundary.
The GitHub Pages workflow runs this audit before uploading the Pages artifact:
.github/workflows/deploy-docs.yml
-> npm run build
-> npm run audit:build
-> upload-pages-artifact
As of 2026-07-05, the workflow is pinned to Node 24 compatible action major versions: actions/checkout@v7, actions/setup-node@v6 with node-version: 24, actions/upload-pages-artifact@v5, and actions/deploy-pages@v5. This keeps the Pages gate away from the older Node 20 deprecation path that previously surfaced during deploy retries.
The deploy job retries the official actions/deploy-pages@v5 step up to three times with short waits between attempts. This retry only covers GitHub Pages service-side deployment failures such as Deployment failed, try again later. It does not mask checkout, install, build, audit, or artifact upload failures, because the deploy job still depends on the completed build job and the retry steps run only after the Pages deploy action itself fails.
Source Ownership
The published language data lives in:
website/src/lib/publishedLanguageScopeData.mjs
Runtime helpers live in:
website/src/lib/publishedLanguageScope.js
website/src/lib/languageRoutePolicy.js
Current published zh-CN doc paths:
/docs/intro
/docs/getting-started/installation
/docs/getting-started/quick-start
/docs/getting-started/configuration
/docs/providers/overview
/docs/pillar-ai-knowledge
/docs/faq
This scope is consumed by:
website/docusaurus.config.jsfor sitemap filtering;website/src/theme/DocItem/Layout/index.jsfor fallback-docnoindex,follow;website/src/theme/SiteMetadata/index.jsfor hreflang and Open Graph locale alternates;website/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.jsfor locale-switch targets;website/src/theme/DocRoot/Layout/Sidebar/index.jsfor zh-CN sidebar filtering;website/src/theme/DocItem/Paginator/index.jsfor zh-CN previous/next filtering;website/src/pages/index.js,website/docusaurus.config.js, andwebsite/static/llms.txtfor public entry points, homepage JSON-LD, release version, and the answer-engine source map.
The important rule is not "add a translation file." The rule is "add the translation file and publish it through the scope data in the same change." If either side is missing, the audit should fail.
The parallel homepage rule is similar: do not change public GEO facts in only one place. If the answer-engine framing, provider count, language scope, release version, or canonical source routes change, update the homepage copy, JSON-LD, llms.txt, and audit-build.cjs together.
Promotion Checklist
When promoting a zh-CN doc from fallback to published:
- Translate the source file under
website/i18n/zh-CN/docusaurus-plugin-content-docs/current/.... - Add the doc id, route path, and source path to
publishedLanguageScopeData.mjs. - Confirm the page should appear in zh-CN sidebar and paginator traversal.
- Update
website/static/llms.txtif the doc becomes part of the public AI retrieval map. - Update
website/src/pages/index.jsif the promoted page changes the homepage source map or the visible language boundary. - Run
npm --prefix website run build && npm --prefix website run audit:build. - After deploy, update
docs/maintainer/github-pages-geo-measurement-log.mdwith Search Console and AI visibility observations.
Why This Shape
The tempting shortcut is to treat Docusaurus locale fallback as useful GEO surface area. That is wrong. It produces URLs that look Chinese but serve English content, weakens hreflang truth, and sends users into routes that were never reviewed as localized pages.
The stricter scope-data model has a maintenance cost: every promotion touches translation content, data, llms.txt, and build proof. The payoff is that sitemap, robots, alternates, UI navigation, and AI retrieval all tell the same truth.
Current Best Direction
- Keep English canonical and complete.
- Grow zh-CN by reviewed critical-path pages, not by locale count.
- Keep provider pages operationally useful before adding more provider landing pages.
- Treat Search Console and AI visibility as post-deploy measurement, not local build proof.
- Avoid new generic wrappers around Docusaurus theme components. Theme overrides are acceptable here only because they own concrete policy: alternates, locale switching, sidebar filtering, and paginator filtering.