]> git.r.bdr.sh - rbdr/blog/blob - src/generator/html.rs
0b258bf044119b2747672d3f3159416ef8705aa9
[rbdr/blog] / src / generator / html.rs
1 use std::io::Result;
2 use std::path::PathBuf;
3 use crate::post::Post;
4 use crate::template::{find, parse};
5
6 pub fn generate(_: &PathBuf, template_directory: &PathBuf, _: &PathBuf, _: &Vec<Post>) -> Result<()> {
7 println!("READING TEMP");
8 match find(template_directory, "index.html") {
9 Some(template) => {
10 let parsed_template = parse(&template);
11 for token in parsed_template.tokens {
12 println!("TOKEN {}", token);
13 }
14 },
15 None => {}
16 }
17 Ok(())
18 }