3 use std::path::PathBuf;
4 use crate::template::{find, parse, TemplateContext};
6 const FILENAME: &str = "index.gph";
8 pub fn archive(_: &PathBuf, template_directory: &PathBuf, target: &PathBuf, context: &TemplateContext) -> Result<()> {
9 match find(template_directory, FILENAME) {
11 let parsed_template = parse(&template);
12 let rendered_template = parsed_template.render(context);
13 let location = target.join(FILENAME);
14 write(location, rendered_template)?;