From 6f9b52954da265066edfca19464d1ef56e29cb53 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Fri, 3 Apr 2026 15:50:13 +0200 Subject: Add html minifier + refactor file writing --- src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 02aac19..1108c23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ struct Data { impl page::Page for Vec { fn page_title() -> String { - String::from("Storys") + String::from("Stories") } fn render_content(self) -> Markup { @@ -44,8 +44,6 @@ fn main() -> Result<()> { let data_file_content = std::fs::read_to_string("data.toml").with_context(|| "Failed to read data.toml")?; let data: Data = toml::from_str(&data_file_content)?; - let stories_html = data.stories.render_page(); - std::fs::write("dist/stories.html", stories_html.into_string()) - .with_context(|| "Failed to write dist/stories.html")?; + data.stories.write_page()?; Ok(()) } -- cgit v1.2.3