ADR-0003 — Use MkDocs with Material Theme as the Documentation Publishing Platform¶
Status¶
Accepted
Context¶
The deterministic documentation pipeline generates Markdown artefacts from multiple sources (terraform-docs, Ansible templates, OPA metadata, ADRs, MoSCoW requirements). These artefacts must be assembled into a cohesive, searchable, and navigable static site that can be published to GitHub Pages or an internal developer portal with minimal operational overhead.
Alternatives evaluated:
| Tool | Pros | Cons |
|---|---|---|
| MkDocs + Material | Python-based; fast; excellent search; Markdown-native; GitHub Pages deploy in one step | Limited non-Markdown content support |
| Docusaurus | React-based; strong versioning | JavaScript dependency; heavier build |
| Backstage | Full developer portal with service catalog | Complex Kubernetes deployment; overkill for docs-only |
| Hugo | Extremely fast; Go-based | Template language less intuitive; fewer IaC-oriented themes |
Decision¶
Adopt MkDocs (≥ 1.5) with the Material for MkDocs theme as the static
site generator. The site is built inside the Docker image and published to
GitHub Pages via mkdocs gh-deploy in the CI/CD pipeline.
Rationale:
- MkDocs natively ingests the Markdown files generated by terraform-docs and Jinja2 Ansible templates without transformation.
- The Material theme provides built-in support for
admonitions,tabs,mermaiddiagrams, and full-text search — all relevant to architecture docs. - A single
mkdocs.ymlfile controls the entire site structure, making the documentation layout version-controlled alongside the infrastructure code.
Consequences¶
- Positive: Zero-friction Markdown pipeline; GitHub Pages hosting is free and requires no infrastructure management; site structure is code.
- Negative: No dynamic server-side rendering; search is client-side only.
- Future work: Evaluate Backstage integration for a full service-catalog experience once the platform scales beyond a single team.