19 lines
559 B
Rust
19 lines
559 B
Rust
pub struct SiteConfig;
|
|
|
|
impl SiteConfig {
|
|
pub const TITLE: &str = "BASE_PATH Demo";
|
|
pub const DESCRIPTION: &str = "A small Leptos SSR app for validating sub-path deployment.";
|
|
pub const BASE_URL: &str = "http://127.0.0.1:3100";
|
|
pub const BASE_PATH: &str = "/rustui";
|
|
|
|
pub fn with_base_path(path: &str) -> String {
|
|
if Self::BASE_PATH.is_empty() {
|
|
path.to_owned()
|
|
} else if path == "/" {
|
|
Self::BASE_PATH.to_owned()
|
|
} else {
|
|
format!("{}{}", Self::BASE_PATH, path)
|
|
}
|
|
}
|
|
}
|