summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 4af487e..77f4fef 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,11 +14,9 @@ fn main() -> Result<()> {
std::fs::write("docs/index.html", output)?;
- let file = std::fs::File::open(std::path::PathBuf::from("stories.json"))?;
- let stories = works::stories::Stories::new_from_file(file);
- let context = stories?.create_tera_context();
-
- let stories_html_output = tera.render("stories.html", &context?)?;
- std::fs::write("docs/stories.html", stories_html_output)?;
+ let stories = works::stories::Stories::new_from_file(std::fs::File::open(
+ std::path::PathBuf::from("stories.json"),
+ )?);
+ stories?.render_overview_page(&tera, "stories")?;
Ok(())
}