Skip to main content

render_doc_at

Function render_doc_at 

Source
pub fn render_doc_at(
    markdown: &str,
    fallback_title: &str,
    pages: &PublishedPages,
    source: Option<&SourceBase>,
    depth: usize,
) -> RenderedAdr
Expand description

render_doc for a page that does not sit at the site root.

depth is how many directories down it is served — 1 for history/build-plan.html. Everything pointing out of the page is relative to where it sits, so a lifetime document that has been archived into a subdirectory still finds the theme, the ADR index and its siblings.

Split from render_doc rather than adding a parameter to it: twelve callers render at the root and should not have to say so.