Skip to main content

write_rendered

Function write_rendered 

Source
pub fn write_rendered(
    contents: &[u8],
    rel_path: &Path,
    output_dir: &Path,
    context: &TemplateContext,
) -> Result<PathBuf>
Expand description

Render embedded template content and write the result to output_dir.

The .tera suffix is stripped from rel_path in the output.

ยงErrors

Returns an error when the template fails to render or I/O fails.