mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-11 02:56:38 -07:00
remove obsolete template_index
This commit is contained in:
parent
e3630208fa
commit
92687016ed
2 changed files with 1 additions and 24 deletions
|
@ -114,9 +114,7 @@ fn remove(builder: &mut SiteBuilder, path: &Path, relative_path: &Path) -> eyre:
|
|||
builder.site.page_index.remove(&page_name_str);
|
||||
std::fs::remove_file(builder.build_path.join(page_name.with_extension("html")))
|
||||
.with_context(|| format!("Failed to remove page at {:?}", path))?;
|
||||
} else if let Ok(template_path) = relative_path.strip_prefix(TEMPLATES_PATH) {
|
||||
let (_template_name, template_name_str) = get_name(template_path);
|
||||
builder.site.template_index.remove(&template_name_str);
|
||||
} else if let Ok(_template_path) = relative_path.strip_prefix(TEMPLATES_PATH) {
|
||||
builder.tera.full_reload()?;
|
||||
builder
|
||||
.site
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue