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.
Re-exports§
pub use crate::resolve::accent_ink_color;pub use crate::resolve::contrast_ratio;
Structs§
- Head
Icon - A
<link rel="icon">/ apple-touch-icon entry for the page head. - Head
Script - A
<script src>entry for the page head. - Page
Config - Configuration for full-page HTML rendering with SurfDoc discovery metadata.
- Page
Entry - A single page extracted from a
::pageblock. - Reading
Frame - Reading-frame chrome for long documents (papers, legal, support): a sticky
toolbar with a back-link + title over a centered reading “sheet”. Set on
PageConfig::reading_frameto wrap the shell page content. - Site
Config - Extracted site-level configuration from a
::siteblock.
Functions§
- extract_
site - Extract site config and page list from a parsed SurfDoc.
- humanize_
route - Convert a route path to a human-readable nav label.
- render_
site_ page - Render a full HTML page for one route within a multi-page site.
- render_
site_ single_ file - Render an entire multi-page site as a SINGLE self-contained HTML document.
- to_html
- to_
html_ fragment - Render a slice of blocks as bare HTML fragments.
- to_
html_ page - Render a
SurfDocas a complete HTML page with SurfDoc discovery metadata. - to_
shell_ page - Render a full HTML page from a site shell plus pre-rendered body HTML.