Skip to main content

collect_relations

Function collect_relations 

Source
pub fn collect_relations(env: &BuildEnvironment) -> BTreeMap<String, Relation>
Expand description

Every document’s [parent, prev, next], from a pre-order walk of the toctree graph rooted at env.root_doc.

Port of BuildEnvironment.collect_relations (environment/__init__.py:778-795) over traverse_toctree. prev/ next are the flattened document order, so the first child of a document has that document as its prev — Sphinx’s chain is linear, not sibling-scoped.