Skip to content

029. Render the guidebook with VitePress ​

Status

Accepted 2026-09-15

Context ​

The guidebook (ADR 028) is Markdown under docs/, and it needs a chapter tree, navigation, and search, which plain Markdown on GitHub does not give. The generator has to sit inside the repository's toolchain, and the chapters and the decision log have to render as one site.

The guidebook also has to show flows – a request, work moving from a need to code. The agents' designs already draw them in Mermaid, and a flow drafted there should move into the guidebook unchanged. Anything regenerated by hand eventually stops being regenerated. The architecture diagrams are decided separately.

Decision ​

We render the guidebook with VitePress, draw its flows with Mermaid, and publish it to GitHub Pages.

  • The chapters and the decision log render as one site, with the theme's local search and no external service.
  • A diagram is a fenced mermaid block in the Markdown it illustrates, styled to the contingent's profile, so a diagram and its prose change together.
  • The site is published to GitHub Pages from main, at the repository's default project URL, by a workflow rather than a branch of committed output.

Consequences ​

  • VitePress adds no second toolchain to install, pin, or keep current.
  • Chapters stay plain Markdown, readable on GitHub, though a link across folders resolves only in the site.
  • Diagrams are source – diffed, reviewed, and edited with the text around them.
  • Mermaid renders in the browser and ships its runtime to any page with a diagram, and every diagram color has to read in both light and dark mode.
  • Any theme extension is written in Vue, sharing nothing with the app's React.
  • The default project URL puts the repository name in every path, so a rename or a custom domain breaks every published link.
  • The built site is never committed, so it cannot drift from its source.

Alternatives considered ​

  • Astro Starlight, Docusaurus, or Nextra – heavier for pure Markdown.
  • MkDocs with Material – a Python toolchain for the docs alone.