Add initial website
Some checks failed
Build Crate / build (push) Failing after 7m23s

This commit is contained in:
2023-09-17 23:25:46 -04:00
parent d640899c80
commit 90c1f58607
16 changed files with 492 additions and 2 deletions

17
src/templates/mod.rs Normal file
View File

@@ -0,0 +1,17 @@
use std::env;
pub mod index;
pub mod long;
pub fn get_path(path: &str) -> String {
// Get base path
match env::var("PERSEUS_BASE_PATH") {
Ok(env_path) => {
// Strip the slash on both sides for directory consistency
// let stripped_env = env_path.trim_start_matches("/").trim_end_matches("/");
// format!("{stripped_env}/{path}").to_string().trim_end_matches("/").to_owned()
path.to_owned()
}
Err(_) => path.to_owned(),
}
}