Skip to main content

to_html_page

Function to_html_page 

Source
pub fn to_html_page(doc: &SurfDoc, config: &PageConfig) -> String
Expand description

Render a SurfDoc as a complete HTML page with SurfDoc discovery metadata.

Produces a full <!DOCTYPE html> document with:

  • <meta name="generator" content="SurfDoc v0.1">
  • <link rel="alternate" type="text/surfdoc" href="..."> pointing to source
  • HTML comment identifying the source file
  • Standard viewport and charset meta tags
  • Embedded dark-theme CSS for all SurfDoc block types