Skip to content

feat: add bilingual project website and GitHub Pages deployment - #674

Merged
gaius-qi merged 1 commit into
mainfrom
feat/project-website
Sep 29, 2026
Merged

gaius-qi merged 1 commit into
mainfrom
feat/project-website

Conversation

@chlins

@chlins chlins commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a responsive bilingual modctl website and Markdown getting-started guide using Hugo 0.167.0 native multilingual support.
  • Keep translated content in content/en and content/zh, UI messages in i18n/*.json, and page structure in shared Hugo layouts.
  • Generate independent English and Chinese URLs, canonical/hreflang metadata, translated SVG labels, and sitemaps at build time.
  • Remove the prototype data-zh DOM replacement, client-side language branches, and custom Node build/server code. JavaScript only enhances copy controls, navigation, tabs, and table of contents.
  • Preserve the custom visual design. Go application code is unchanged.
  • GitHub Pages CI installs a pinned, checksum-verified Hugo binary. PRs test/build only, upstream main deploys with job-scoped permissions.

Validation

  • 10 tests passed, using actual Hugo builds: locale/content completeness, frontmatter parity, Pages subpath links/anchors, reciprocal language metadata, copy render hooks, complete no-JS workflow content, and SVG special-character/injection escaping.
  • Strict production build passes with --printI18nWarnings --panicOnWarning.
  • Missing-translation and missing-content mutations were verified to fail rather than silently fall back.
  • Browser checks pass for four page/locale routes across seven viewport sizes (28 combinations), language link navigation, copy, keyboard tabs, mobile menu, and no-JavaScript Chinese content.
  • axe-core WCAG A/AA checks found no violations on both pages in both languages.

Language URLs

Language is determined by URL, not browser storage or a runtime DOM translation script. The previous prototype ?lang=zh parameter is replaced by /zh/.

Deployment

GitHub Pages is configured with GitHub Actions as its source, HTTPS enforced, and the github-pages environment restricted to main.

"All changes are squashed into one signed-off commit, and the DCO check passes. This PR still needs the required two approvals." After merge, the Website workflow will publish automatically. No custom domain, additional token, or gh-pages branch is needed. The public site is not deployed yet.

Add localized homepage and getting-started content, shared Hugo layouts, accessible interactions, and self-hosted visual assets.

Use native build-time internationalization with independent language URLs and strict translation, routing, and SVG escaping checks.

Configure guarded GitHub Pages deployment and document the website maintenance workflow.

Signed-off-by: chlins <[email protected]>
@chlins
chlins force-pushed the feat/project-website branch from ff7a59a to 74289ce Compare September 29, 2026 06:25
@chlins
chlins enabled auto-merge (squash) September 29, 2026 08:15

@gaius-qi gaius-qi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi
gaius-qi disabled auto-merge September 29, 2026 13:24
@gaius-qi
gaius-qi enabled auto-merge (squash) September 29, 2026 13:24
@gaius-qi
gaius-qi disabled auto-merge September 29, 2026 13:25
@gaius-qi
gaius-qi merged commit 605ce44 into main Sep 29, 2026
7 checks passed
@gaius-qi
gaius-qi deleted the feat/project-website branch September 29, 2026 13:25
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.

2 participants