Work through a tutorial outline¶
This page uses tutorial.leo
as a small, repeatable example. The commands below run during the Zensical
build, so the displayed outline is generated from the actual Leo file.
Inspect the outline¶
The compact inspector includes positions, GNXs, headlines, and bodies:
This is useful when diagnosing an outline, but it is intentionally dense. For documentation, render only the hierarchy:
Render the hierarchy¶
The outline renderer emits a nested Markdown list. A repeated vnode is shown as
↪ clone, so the Tasks entry under Reference makes the clone visible without
duplicating its descendants.
Highlight a current section¶
Use an occurrence position to mark the section being discussed. The position is occurrence-specific, which matters when a node is cloned:
The current node and its ancestors receive CSS classes that the site theme can highlight.
Collapse the sample¶
For a compact book sidebar or a step-by-step tutorial, collapse unrelated branches and open the path around the current section:
Collapsed output uses native HTML <details> elements. No JavaScript or saved
Leo UI state is needed, so the page remains deterministic in CI and stable when
the outline is edited.
The rendered sample¶
This is a mixed expanded/collapsed output, included directly so the tutorial remains previewable on Zensical versions without third-party build plugins. Documentation and Reference are open; Tasks is shown as a quiet collapsed branch marker. The static sample is not interactive.
- Tutorial project
- Project
- Source
- main.rs
- lib.rs
- tests.rs
- Documentation
- Tutorial
- Concepts
- Command reference
- Tasks
- Source
- Reference
- Tasks ↪ clone
- Concepts ↪ clone
- Command reference ↪ clone
- Project