BMAD-METHOD/website
Alex Verkhovsky ed76f57a19
feat(i18n): add zh-CN locale support (#1822)
* feat(i18n): add zh-cn locale support with Starlight routing

Reorganize Chinese translations from docs_cn/ into docs/zh-cn/
following Starlight's i18n content structure. Configure Starlight
with root locale (en, unprefixed) and zh-cn (/zh-cn/ prefix).

- Move 28 files from docs_cn/*_cn.md to docs/zh-cn/*.md
- Fix 21 internal links to remove _cn suffixes
- Add defaultLocale + locales config to astro.config.mjs
- Add .gitignore exception for docs/zh-cn/ (overrides z*/ rule)
- Language switcher activates automatically via existing Header
- hreflang tags auto-generated by Starlight on all pages

* feat(i18n): add zh-CN UI translations and sidebar labels

- Add website/src/content/i18n/zh-CN.json with Starlight UI strings
- Add sidebar group label translations (欢迎, 路线图, 教程, etc.)
- Register i18n collection in content config to fix deprecation warning

* fix(i18n): exclude 404 pages from sitemap

Custom 404 pages (root and zh-cn) were indexed as regular content in
the sitemap. Add a filter to the @astrojs/sitemap integration that
matches the /404 path segment precisely via regex on the URL pathname.
2026-03-06 20:21:43 -06:00
..
public fix(docs): comprehensive documentation site review fixes (#1578) 2026-02-08 11:58:22 -06:00
src feat(i18n): add zh-CN locale support (#1822) 2026-03-06 20:21:43 -06:00
README.md refactor: remove downloads page and bundle generation (#1577) 2026-02-06 23:26:39 -06:00
astro.config.mjs feat(i18n): add zh-CN locale support (#1822) 2026-03-06 20:21:43 -06:00

README.md

BMAD Method Documentation Site

This directory contains the Astro + Starlight configuration for the BMAD Method documentation site.

Architecture

The documentation uses a symlink architecture to keep content in docs/ at the repo root while serving it through Astro:

bmad2/
├── docs/                          # Content lives here (repo root)
│   ├── index.md
│   ├── tutorials/
│   ├── how-to/
│   ├── explanation/
│   └── reference/
└── website/
    ├── astro.config.mjs           # Astro + Starlight config
    ├── src/
    │   ├── content/
    │   │   └── docs -> ../../docs # Symlink to content
    │   └── styles/
    │       └── custom.css         # Custom styling
    └── public/                    # Static assets

Development

# From repo root
npm run docs:dev      # Start dev server
npm run docs:build    # Build for production
npm run docs:preview  # Preview production build

Platform Notes

The website/src/content/docs symlink may not work correctly on Windows without Developer Mode enabled or administrator privileges.

To enable symlinks on Windows:

  1. Enable Developer Mode (recommended):

    • Settings → Update & Security → For developers → Developer Mode: On
    • This allows creating symlinks without admin rights
  2. Or use Git's symlink support:

    git config core.symlinks true
    

    Then re-clone the repository.

  3. Or create a junction (alternative):

    # Run as Administrator
    mklink /J website\src\content\docs ..\..\docs
    

If symlinks don't work, you can copy the docs folder instead:

# Remove the symlink
rm website/src/content/docs

# Copy the docs folder
cp -r docs website/src/content/docs

Note: If copying, remember to keep the copy in sync with changes to docs/.

Build Output

The build pipeline (npm run docs:build) produces:

  • Static HTML site in build/site/
  • LLM-friendly files: llms.txt, llms-full.txt