aboutsummaryrefslogtreecommitdiff
path: root/src/generator/html.rs
blob: 0b258bf044119b2747672d3f3159416ef8705aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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<Post>) -> 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(())
}