Re-enabled compiling templates from bin.rs.
This commit is contained in:
parent
f1ec0ffb9e
commit
6bde22b667
26
src/bin.rs
26
src/bin.rs
@ -39,18 +39,20 @@ fn main() {
|
|||||||
(p.to_string(), template_content)
|
(p.to_string(), template_content)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
// let compiled_templates: Vec<CompiledTemplate> = template_contents
|
let compiled_templates_result: Result<Vec<(String, Template)>, CompileError> =
|
||||||
// .iter()
|
template_contents
|
||||||
// .map(|(p, contents)| template_from_file(p, contents))
|
.iter()
|
||||||
// .collect();
|
.map(|(p, contents)| template_from_file(p, contents))
|
||||||
// let mut dust_renderer = DustRenderer::new();
|
.collect();
|
||||||
// compiled_templates.iter().for_each(|template| {
|
let compiled_templates = compiled_templates_result.unwrap();
|
||||||
// dust_renderer.load_source(template);
|
let main_template_name = &compiled_templates
|
||||||
// });
|
.first()
|
||||||
// let main_template_name = &compiled_templates
|
.expect("There should be more than 1 template")
|
||||||
// .first()
|
.0;
|
||||||
// .expect("There should be more than 1 template")
|
let mut dust_renderer = DustRenderer::new();
|
||||||
// .name;
|
compiled_templates.iter().for_each(|(name, template)| {
|
||||||
|
dust_renderer.load_source(template, name.to_owned());
|
||||||
|
});
|
||||||
// let breadcrumbs = vec![&context as &dyn IntoContextElement];
|
// let breadcrumbs = vec![&context as &dyn IntoContextElement];
|
||||||
// println!(
|
// println!(
|
||||||
// "{}",
|
// "{}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user