Skip to content

fix: correct Chinese documentation SEO metadata and routes - #1

Merged
zxch3n merged 1 commit into
mainfrom
fix/chinese-docs-seo-20260930
Sep 30, 2026
Merged

zxch3n merged 1 commit into
mainfrom
fix/chinese-docs-seo-20260930

Conversation

@zxch3n

@zxch3n zxch3n commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Move API presentation helpers out of pages/ so they no longer become public routes; preserve helper bytes and update imports.
  • Set Chinese self-canonical URLs, Chinese document/content language, social metadata and source edit links. Emit reciprocal en/zh/x-default alternates only for 66 verified translated route pairs.
  • Repair malformed external links and the rich-text article link; correct sitemap, robots and RSS to use https://cn.loro.dev.
  • Add source/MDX and rendered-output SEO regression checks, and regenerate RSS during production builds.

This preserves the finalized reviewed patch. The generated RSS diff is large because previously tracked feeds contained English bodies; regenerated feeds now reflect existing Chinese source. Four existing bare <=1.7.x prose literals are wrapped in inline code to fix baseline Nextra parsing, without changing technical meaning or code examples.

Validation

Completed against baseline 24c9bc9ce66e358029787f49358eebb27e3fd328:

  • PASS: node --test scripts/seo.test.mjs — 6 tests, including actual Nextra MDX compilation of the affected API/event files
  • PASS: node_modules/.bin/tsc --noEmit --incremental false
  • PASS: CIRCLE_NODE_TOTAL=2 NEXT_TELEMETRY_DISABLED=1 npm run build — RSS generation, Next production build/static generation, sitemap and rendered SEO checks
  • PASS: All 66 content pages have one Chinese canonical, expected reciprocal language alternates and Chinese language metadata; sitemap contains 66 CN URLs; former helper routes are absent
  • PASS: 20 local production HTTP checks covering content/query URLs, removed helpers, missing translations, sitemap, robots and feeds
  • PASS: git diff --check and clean patch applicability against the exact baseline; helper files are 100% renames

Validation limits

Locally, the existing Deno documentation-example suite was attempted twice, but both attempts stopped fetching https://jsr.io/@std/fs/meta.json before examples ran.

After publication, GitHub Actions run 36666548388 for head 03eac25c648d09f00c7d63f1b8e8c4076e28b1b9 completed and was marked successful. However, its job log reports 122 examples: 121 passed, 1 failed. The failure is the existing bare loro-mirror import in pages/blog/loro-mirror.mdx:71, which Deno cannot resolve. The failing example and deno_scripts/run_code_blocks.ts are unchanged from the baseline; this PR only fixes the author link in that article. The existing runner counts failures without returning a failing exit code, so the green workflow does not mean the full snippet suite passed. Those unrelated issues are left outside this SEO patch.

The successful build used one Next worker via CIRCLE_NODE_TOTAL=2 in the memory-constrained validation environment. Existing read-only global Git config, outdated Browserslist data and WASM async/await warnings remain. No dependency lockfile or workspace configuration changes are included.

Draft for review; no merge or deployment has been performed.

@zxch3n
zxch3n marked this pull request as ready for review September 30, 2026 04:01
@zxch3n
zxch3n merged commit 93c2012 into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant