- let parsed_template = parse(&template);
- println!("TOKEN {}", parsed_template.render(context));
+ let parsed_template = parse(&template)
+ .ok_or_else(|| Error::new(Other, "Unable to parse HTML template"))?;
+ let rendered_template = parsed_template.render(context)?;
+ let location = target.join(FILENAME);
+ write(location, rendered_template)?;