Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Writing documentation

This book is built with mdbook, with mdbook-mermaid for diagrams. Its source is in docs/src/, and docs/src/SUMMARY.md is the table of contents.

nix run .#docs             # live preview at http://localhost:3000, no dev shell needed
mdbook serve docs --open   # the same, from the dev shell
mdbook build docs          # writes docs/book/
nix build .#docs           # the whole site into ./result, as CI builds it

Where things go

PartHolds
User guideHow to use doris, by task
FlowsOne page per flow and per step: what runs, and what a result means
ReferenceMaterial to look up: commands, terms
ArchitectureHow doris is put together, and why. Only what is built
Developer guideHow to work on doris
RoadmapWhat is designed but not built, and nothing else

The main parts describe doris as it is. If a page says doris does something, the code does it. A feature that is planned goes in the Roadmap. The change that builds it moves it to the main parts, with its design in Architecture, and takes it out of the roadmap, so the roadmap only ever lists what is outstanding. A roadmap page starts with one Built line that links to where the built part is described.

State limits as facts. Where doris does not do something a reader might expect, say so on the page they would look at, and link to the roadmap if it is planned.

Each flow and step page says what passed means and what to check by hand. A reviewer relies on these to judge a run.

API documentation

nix build .#docs also runs cargo doc and puts the result under api/ in the site, where the API documentation page links to it. mdbook serve does not, so that link is dead in a local preview. Build the API documentation by itself with:

cargo doc --no-deps --document-private-items --open

doris is a binary crate, so --document-private-items is what makes its modules appear.

Checks

nix flake check builds the book and checks its internal links with lychee. nix fmt formats Markdown with prettier, which also aligns tables.

mermaid.min.js and mermaid-init.js were added by mdbook-mermaid install docs. Rerun that command to update them when mdbook-mermaid is upgraded. Update the bundled dependency notices from the matching Mermaid release source map and upstream package licences at the same time.

Publishing

Pushes to main publish the site to GitHub Pages through .github/workflows/docs.yml. Pull requests build it without publishing.