The doctree

A documentation set is a tree. The interior nodes in this tree are what we call Bales. The leaf nodes are Pages. All together this is the doctree.

A single node in the doctree should represent the un-traversed state of that node. Each unopend bale can contain any number of child items, along with it’s current index. If no index found on disk we should fabricate one from the folder name. Later layouts may choose to render this with a grid of child pages or similar.

Each point in the tree needs to be targetable with navigation. To create a link we need to know two things: the slug for the item, and the item’s title.

pub struct NavItem {
    pub title: String,
    pub slug: Slug,
}