--- /dev/null
+use std::fs::write;
+use std::io::Result;
+use std::path::PathBuf;
+use crate::template::{find, parse, TemplateContext};
+
+const FILENAME: &str = "index.gph";
+
+pub fn archive(_: &PathBuf, template_directory: &PathBuf, target: &PathBuf, context: &TemplateContext) -> Result<()> {
+ match find(template_directory, FILENAME) {
+ Some(template) => {
+ let parsed_template = parse(&template);
+ let rendered_template = parsed_template.render(context);
+ let location = target.join(FILENAME);
+ write(location, rendered_template)?;
+ },
+ None => {}
+ }
+ Ok(())
+}