@@ -1,6 +1,9 @@
|
||||
use std::{fs, path::Path};
|
||||
|
||||
use part::Parts;
|
||||
|
||||
mod law;
|
||||
mod part;
|
||||
|
||||
fn main() {
|
||||
fs::create_dir_all("./output").unwrap();
|
||||
@@ -15,6 +18,7 @@ fn main() {
|
||||
fn create_index(content: &str) {
|
||||
let mut index = fs::read_to_string("templates/index.html").unwrap();
|
||||
index = index.replace("{{content}}", content);
|
||||
let index = Parts::new().perform(index);
|
||||
fs::write("output/index.html", &index).expect("Unable to write file");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user