Skip to main content

Module loader

Module loader 

Source
Expand description

Load docs from an rtb_assets::Assets tree into the (Index, HashMap<path, body>) shape that crate::DocsBrowser and crate::DocsServer consume.

The convention is:

  • <root>/_index.yaml โ€” optional, parsed via crate::index::parse_index.
  • Every .md file under <root>/ โ€” body is loaded into the returned HashMap keyed on its <root>-relative path. When no _index.yaml is present, crate::index::scan_index derives one from the discovered pages.

Asset-source layering is preserved: an embedded _index.yaml is deep-merged with on-disk overrides exactly as rtb_assets::Assets::load_merged_yaml does for any other YAML.

Functionsยง

load_docs
Walk <root>/ for .md files + an optional _index.yaml. Returns the parsed Index and a path -> body map.