Documentation
¶
Overview ¶
Command docsgen produces the Crucible docs site's generated content: the API reference (rendered from godoc via gomarkdoc) and the Mermaid diagrams built from the real example machines.
It is run from the repository root before the Astro build, in both the PR docs job and the Pages deploy workflow, so the published reference and diagrams are always regenerated from the current source and never committed (the output directories are gitignored). The generator is deterministic and idempotent: running it twice yields byte-identical output.
Usage, from the repo root:
go run ./tools/docsgen
All output paths are resolved relative to the repository root, which is located by walking up from this file's module to the directory that holds go.work. This keeps the tool independent of the caller's working directory.