Skip to main content

Module index

Module index 

Source
Expand description

Navigation index — either parsed from _index.yaml under the doc-tree root or synthesised from a recursive .md file scan.

§YAML shape

title: My Tool Documentation
sections:
  - title: Getting started
    pages:
      - { path: intro.md, title: Introduction }
      - { path: install.md, title: Install }
  - title: Reference
    pages:
      - { path: config.md, title: Configuration reference }

§Fallback scan

When no _index.yaml exists under the root, the index is derived by:

  1. Walking the tree for .md files (skipping _index.yaml).
  2. For each page, parsing the first # Heading line as its title; pages with no heading use their filename as a fallback.
  3. Grouping by top-level directory into sections; pages directly under the root go into an “Overview” section.

Structs§

Index
Parsed document index.
IndexEntry
One navigable page.
IndexSection
A named group of pages, shown as an expandable heading in the browser’s left pane.

Functions§

parse_index
Parse an _index.yaml body. Paths containing .. or absolute components are rejected.
scan_index
Synthesise an index from a list of (relative_path, body) pairs. Pairs should be paths under the doc-tree root.