Skip to content

Commit

Permalink
add theme's robots.txt to tera with correct name
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcz committed Jan 7, 2022
1 parent 508a11f commit cee2067
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/templates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ pub fn load_tera(path: &Path, config: &Config) -> Result<Tera> {
rewrite_theme_paths(&mut tera_theme, theme);

if theme_path.join("templates").join("robots.txt").exists() {
tera_theme.add_template_file(theme_path.join("templates").join("robots.txt"), None)?;
tera_theme.add_template_file(
theme_path.join("templates").join("robots.txt"),
Some("robots.txt"),
)?;
}
tera.extend(&tera_theme)?;
}
Expand Down

0 comments on commit cee2067

Please sign in to comment.