Skip to main content

Module basepass

Module basepass 

Source
Expand description

AST pass that replaces ```base fenced code blocks with a rendered Obsidian Base (static table/cards/list HTML), computed against the whole-site corpus.

Runs in render_doc (top level) when the bases feature is on and a corpus is available. Mirrors crate::mermaidpass structurally, but the block body is the .base YAML source rendered to HTML at build time (no island, no runtime). Malformed YAML degrades to an inline error block (never a panic), matching the PlantUML/:include graceful-degradation ethos.

Functionsยง

transform_bases
Replace every ```base fenced block with its rendered view HTML. Returns the count of bases rendered (lets callers record whether a page used one).