diff --git a/src/main.rs b/src/main.rs index 57c9112..c6a1774 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,9 @@ fn main() { let content = get_content(&path); let template = fs::read_to_string("templates/index.html").unwrap(); - let site = template.replace("{{content}}", &content); + let site = template + .replace("{{content}}", &content) + .replace("{{title}}", &law_name); fs::write(&format!("output/{law_name}.html"), &site).expect("Unable to write file"); } diff --git a/templates/index.html b/templates/index.html index 2db609c..7eb61b6 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,13 +1,11 @@
- + -