Skip to main content

wrap_full_html

Function wrap_full_html 

Source
pub fn wrap_full_html(output: &RenderOutput, title: &str) -> String
Expand description

Wraps a RenderOutput fragment in a complete <!DOCTYPE html> document.

The generated document includes:

  • Charset + viewport <meta> tags
  • <title> set to title
  • KaTeX CSS/JS CDN tags (math rendering)
  • Mermaid.js CDN tag (diagram rendering)
  • Theme CSS extracted from the render output (if present)
  • The rendered body HTML