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 @@ - + -

ABGB

- {{content}} +
+

{{title}}

+ {{content}} +
diff --git a/templates/style.css b/templates/style.css new file mode 100644 index 0000000..6a8a0a8 --- /dev/null +++ b/templates/style.css @@ -0,0 +1,3 @@ +h2,h3,h4,h5,h6 { + display: inline; +}