X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/0e276d039b8613de0cbd302bf328bb660ab063b6..2998247083406f914b3647cedd19abf5507bf2c6:/src/generator/html.rs diff --git a/src/generator/html.rs b/src/generator/html.rs new file mode 100644 index 0000000..0b258bf --- /dev/null +++ b/src/generator/html.rs @@ -0,0 +1,18 @@ +use std::io::Result; +use std::path::PathBuf; +use crate::post::Post; +use crate::template::{find, parse}; + +pub fn generate(_: &PathBuf, template_directory: &PathBuf, _: &PathBuf, _: &Vec) -> Result<()> { + println!("READING TEMP"); + match find(template_directory, "index.html") { + Some(template) => { + let parsed_template = parse(&template); + for token in parsed_template.tokens { + println!("TOKEN {}", token); + } + }, + None => {} + } + Ok(()) +}