Documentation
¶
Overview ¶
Command gen scans the repository for example_*_test.go files that carry an "iceberg:doc" metadata block and regenerates the Concepts section of the mdbook website.
A publishable example file looks like:
// iceberg:doc
// title: Multi-Table Transactions
// section: Transactions
// order: 10
// slug: multi-table-transactions
//
// Prose describing the concept...
package catalog_test
// ANCHOR: example
func Example_multiTable() { ... }
// ANCHOR_END: example
Each matching file produces website/src/concepts/<slug>.md. The code blocks are emitted as mdbook "{{#include file:anchor}}" directives, so mdbook pulls the latest source at build time. The generator also rewrites the block between "<!-- GEN:START concepts -->" and "<!-- GEN:END -->" in website/src/SUMMARY.md.
Run from the repo root:
go run ./website/gen
Click to show internal directories.
Click to hide internal directories.