]> git.r.bdr.sh - rbdr/blog/blob - src/generator/html.rs
cff4aea13e5a1bfba845a608782abb0995c6d8b5
[rbdr/blog] / src / generator / html.rs
1 use std::io::Result;
2 use std::path::PathBuf;
3 use crate::template::{find, parse, TemplateContext};
4
5 pub fn generate(_: &PathBuf, template_directory: &PathBuf, _: &PathBuf, context: &TemplateContext) -> Result<()> {
6 match find(template_directory, "index.html") {
7 Some(template) => {
8 let parsed_template = parse(&template);
9 println!("TOKEN {}", parsed_template.render(context));
10 },
11 None => {}
12 }
13 Ok(())
14 }