summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorveradec <glitchmill.dyj3d@simplelogin.co>2026-11-02 23:38:09 +0530
committerveradec <glitchmill.dyj3d@simplelogin.co>2026-11-02 23:38:09 +0530
commit2db9860ad49ce63df0d7cc99ec7c393401493c9f (patch)
tree48e485e1d0add02c8e88ac6b2fd63c6016596213 /src/main.rs
parent54d19444694d8a6245c893069dee19e2ec07cfca (diff)
fix: index page will get copied to be compatible in case index.md doesnt existHEADmain
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
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<String>) {
}
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"));