Skip to main content

render_template

Function render_template 

Source
fn render_template(tera: &Tera, title: &str, content: &str) -> Result<String>
Expand description

Render the Tera template with the given title and HTML content.

title is passed as a plain string; Tera auto-escapes it when inserted into {{ title }}. content is the already-rendered HTML fragment and must be inserted with {{ content | safe }} in the template.