Building the documentation¶
The documentation has three supported workflows: local preview, strict HTML validation, and combined PDF export.
Reproducible toolchain¶
The docs dependencies are pinned in tools/docs/uv.lock. Commands use uv run --project tools/docs --locked so local and CI builds resolve the same MkDocs, Material, and PDF-renderer versions.
Do not replace the repository commands with an unpinned global MkDocs installation when validating a release.
Local preview¶
The watch configuration reloads changes in docs/, the package-local documentation directories, and the Docker tutorial sources.
Strict HTML and search-index build¶
Output:
The build fails for invalid navigation, broken internal links, unresolved snippets, or unrecognized links.
Combined PDF build¶
Output:
The script performs two passes:
- a strict HTML/link/search-index validation pass;
- a PDF-enabled rendering pass followed by PDF header, size, and EOF integrity checks.
The passes are intentionally separate. WeasyPrint reports unsupported browser-only Material CSS rules while still producing a valid print document; enabling MkDocs strict mode during that rendering pass would promote those harmless renderer diagnostics to build failures.
PDF styling¶
Print-specific rules live in:
The stylesheet defines A4 output, printable margins, local system fonts, wrapped code blocks, repeated table headers, and page-break avoidance for tables, figures, admonitions, and code blocks.
CI artifacts¶
Both documentation workflows generate the PDF:
.github/workflows/ci.ymluploadscall-baxter-documentation-pdfas a workflow artifact;.github/workflows/docs.ymluploads the same standalone artifact and includes it in the GitHub Pages site.