BMAD-METHOD/website
Alex Verkhovsky 6064903878 refactor(docs): migrate from Docusaurus to Astro+Starlight
Replace Docusaurus with Astro and the Starlight documentation theme
for improved performance, better customization, and modern tooling.

Build pipeline changes:
- New build-docs.js orchestrates link checking, artifact generation,
  and Astro build in sequence
- Add check-doc-links.js for validating internal links and anchors
- Generate llms.txt and llms-full.txt for LLM-friendly documentation
- Create downloadable source bundles (bmad-sources.zip, bmad-prompts.zip)
- Suppress MODULE_TYPELESS_PACKAGE_JSON warning in Astro build
- Output directly to build/site for cleaner deployment

Website architecture:
- Add rehype-markdown-links.js plugin to transform .md links to routes
- Add site-url.js helper for GitHub Pages URL resolution with strict
  validation (throws on invalid GITHUB_REPOSITORY format)
- Custom Astro components: Banner, Header, MobileMenuFooter
- Symlink docs/ into website/src/content/docs for Starlight

Documentation cleanup:
- Remove Docusaurus _category_.json files (Starlight uses frontmatter)
- Convert all docs to use YAML frontmatter with title field
- Move downloads.md from website/src/pages to docs/
- Consolidate style guide and workflow diagram docs
- Add 404.md and tutorials/index.md
2026-01-06 22:11:10 -08:00
..
public refactor(docs): migrate from Docusaurus to Astro+Starlight 2026-01-06 22:11:10 -08:00
src refactor(docs): migrate from Docusaurus to Astro+Starlight 2026-01-06 22:11:10 -08:00
README.md refactor(docs): migrate from Docusaurus to Astro+Starlight 2026-01-06 22:11:10 -08:00
astro.config.mjs refactor(docs): migrate from Docusaurus to Astro+Starlight 2026-01-06 22:11:10 -08: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
  • Downloadable ZIP bundles in downloads/