Skip to main content

compile_site

Function compile_site 

Source
pub fn compile_site(src: &Path, out: &Path) -> Result<SiteReport>
Expand description

Compile every .md under src (recursive, hidden dirs skipped) into the mirrored .html layout under out, wrapped in the site chrome. Front-matter (title, description, slug, date) overrides the title/description/route/date fallbacks. Directive roots are each page’s own directory, matching the single-file CLI’s default.

A site.toml with base_url additionally emits llms.txt, sitemap.xml, and robots.txt; src/assets/** is mirrored to out/_assets/**; and search.json + search.bin (a docs-search index) are emitted for client-side search.

§Errors

I/O failures on the tree walk or output creation.