links and some path checks
This commit is contained in:
parent
177c23da42
commit
a3cf2380b7
@ -107,4 +107,4 @@ links:
|
||||
links:
|
||||
- text: Fork this project!
|
||||
icon: fa-solid fa-code-fork
|
||||
href: https://github.com/tyrelsouza/lazylinks
|
||||
href: https://gitea.tyrel.dev/tyrel/rustylinks
|
||||
|
@ -55,7 +55,10 @@ fn write_file(html: String ) {
|
||||
fs::remove_dir_all("./output").expect("could not remove directory");
|
||||
}
|
||||
fs::create_dir("./output").expect("Could not create output directory");
|
||||
// copy all files in static to output
|
||||
if Path::new("./output").exists() {
|
||||
copy_recursively("./static", "./output").expect("Could not copy static directory");
|
||||
}
|
||||
fs::write("./output/index.html", html).expect("Could not write to index.html");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user