|
|
@@ -670,9 +670,11 @@ impl Site { |
|
|
|
/// Renders robots.txt |
|
|
|
pub fn render_robots(&self) -> Result<()> { |
|
|
|
ensure_directory_exists(&self.output_path)?; |
|
|
|
let mut context = Context::new(); |
|
|
|
context.insert("config", &self.config); |
|
|
|
create_file( |
|
|
|
&self.output_path.join("robots.txt"), |
|
|
|
&render_template("robots.txt", &self.tera, &Context::new(), &self.config.theme)?, |
|
|
|
&render_template("robots.txt", &self.tera, &context, &self.config.theme)?, |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|