From 2db9860ad49ce63df0d7cc99ec7c393401493c9f Mon Sep 17 00:00:00 2001 From: veradec Date: Mon, 2 Nov 2026 23:38:09 +0530 Subject: fix: index page will get copied to be compatible in case index.md doesnt exist --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0731e18..3ba3059 100644 --- a/src/main.rs +++ b/src/main.rs @@ -172,6 +172,9 @@ fn vec2html(mut path: String, dir_names: Vec) { } fn main() -> Result<()> { + // copy index.html to public/ + fs::copy("templates/index.html", "public/index.html"); + /// for file in WalkDir::new("content/").into_iter().filter_map(|e| e.ok()) { let file_name = file.file_name().to_string_lossy(); if file_name.ends_with(".md") { @@ -180,6 +183,7 @@ fn main() -> Result<()> { } generate_lists("public/".into()); + // copy static folder to public folder copy_dir(Path::new("static"), Path::new("public")); -- cgit v1.2.3