restructuring page:index

This commit is contained in:
りき萌 2024-11-12 22:51:36 +01:00
parent e201ea7058
commit d13abe7afa
8 changed files with 80 additions and 73 deletions

View file

@ -543,12 +543,16 @@ impl Generator {
feeds: &feeds,
season: Season::current(),
};
let template_name = roots
let mut template_name = roots
.attributes
.template
.clone()
.unwrap_or_else(|| "_tree.hbs".into());
if !template_file_ids.contains_key(&template_name) {
template_name = "_tree.hbs".into();
}
// Reinsert the stolen roots.
treehouse.roots.insert(parsed_tree.root_key, roots);