Skip to main content

render

Function render 

Source
pub fn render(view_path: &str, state: &Value) -> Result<String>
Expand description

Render a Spark component template with the given JSON state as context.

Resolves @extends and @include references by pre-loading every referenced layout / partial into the MiniJinja environment using the same load_and_lower pipeline as the entry template. Walks the lowered output transitively, so page.forge.html → layouts/app.forge.html → layouts/base.forge.html all resolve correctly.