Browse Source

inject livereloader for 404 template

index-subcmd
Anton Lazarev 6 years ago
parent
commit
885c7ded80
No known key found for this signature in database GPG Key ID: FBD20243E0CD9104
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      components/site/src/lib.rs

+ 2
- 1
components/site/src/lib.rs View File

@@ -627,9 +627,10 @@ impl Site {
ensure_directory_exists(&self.output_path)?; ensure_directory_exists(&self.output_path)?;
let mut context = Context::new(); let mut context = Context::new();
context.insert("config", &self.config); context.insert("config", &self.config);
let output = render_template("404.html", &self.tera, &context, &self.config.theme)?;
create_file( create_file(
&self.output_path.join("404.html"), &self.output_path.join("404.html"),
&render_template("404.html", &self.tera, &context, &self.config.theme)?,
&self.inject_livereload(output),
) )
} }




Loading…
Cancel
Save