Skip to main content

Module render_html

Module render_html 

Source
Expand description

HTML fragment renderer.

Produces semantic HTML with surfdoc-* CSS classes. Markdown blocks are rendered through pulldown-cmark. All other content is HTML-escaped to prevent XSS.

Structs§

PageConfig
Configuration for full-page HTML rendering with SurfDoc discovery metadata.
PageEntry
A single page extracted from a ::page block.
SiteConfig
Extracted site-level configuration from a ::site block.

Functions§

extract_site
Extract site config and page list from a parsed SurfDoc.
render_site_page
Render a full HTML page for one route within a multi-page site.
to_html
Render a SurfDoc as an HTML fragment.
to_html_page
Render a SurfDoc as a complete HTML page with SurfDoc discovery metadata.