Source-level directive pre/post pass. extract rewrites raw markdown,
replacing each directive with an HTML-comment sentinel and returning the
parsed instances; substitute swaps sentinels for rendered component HTML
after comrak has formatted the surrounding markdown.
Build-time KaTeX rendering. Each math expression in a document is rendered
to static HTML at build time via the katex crate (default quick-js
backend), so the generated site ships zero runtime JS for math.