Documentation
¶
Overview ¶
Command docs-figures draws the figures of the documentation. For every figure it writes a pair into docs/diagrams/: a draw.io source (<name>.drawio) and the SVG export of that source (<name>.svg) that the pages embed.
Both files of a pair are rendered from the same elements, so they cannot disagree. A figure is changed by changing its function in one of the fig_*.go files and running the tool again; a hand edit to a generated pair is overwritten on the next run, and the drift test fails it before that. docs/reference/development/diagrams.md is the guide: the inventory of every figure and the page that embeds it, the file-name prefixes, and the visual conventions.
Usage:
go run ./tools/docs-figures # rewrite every pair go run ./tools/docs-figures -check # exit non-zero if a pair is stale go run ./tools/docs-figures -root DIR # operate on a tree other than the cwd go run ./tools/docs-figures -frames # write the build stages under bin/figure-frames
The frames of a staged figure are for slides, which build a figure up step by step. They are build output, not part of a pair: nothing embeds them in the docs and nothing commits them.