Skip to main content

wrap_document

Function wrap_document 

Source
pub fn wrap_document(
    skeleton: &str,
    css_files: &[String],
    js_files: &[String],
    dev_mode: bool,
    vite: Option<&ViteDevInfo>,
    root_id: &str,
) -> String
Expand description

Wrap a skeleton HTML fragment in a compact HTML5 document with asset references. Produces minimal single-line output for production templates. When dev_mode is true, injects a live reload SSE script before </body>. When vite is Some, replaces static CSS/JS refs with Vite dev server scripts.