Create a page header struct.
This commit is contained in:
@@ -34,7 +34,7 @@ impl<'a> RendererIntegration<'a> for DusterRenderer<'a> {
|
||||
}
|
||||
// TODO: This is horribly inefficient. I am converting from a serialize type to json and back again so I can use the existing implementation of IntoContextElement. Honestly, I probably need to rework a lot of duster now that I've improved in rust over the years.
|
||||
let json_context = serde_json::to_string(&context)?;
|
||||
println!("{}", json_context);
|
||||
// println!("{}", json_context);
|
||||
let parsed_context: serde_json::Value = serde_json::from_str(json_context.as_str())?;
|
||||
let rendered_output = dust_renderer.render("main", Some(&parsed_context))?;
|
||||
Ok(rendered_output)
|
||||
|
||||
Reference in New Issue
Block a user