ailearnhub_net_site_kit/lib.rs
1pub const DOMAIN: &str = "ailearnhub.net";
2pub const HOMEPAGE: &str = "https://ailearnhub.net";
3
4pub fn build_url(path: &str) -> String {
5 let clean_path = path.trim_start_matches('/');
6 if clean_path.is_empty() { HOMEPAGE.to_string() } else { format!("{}/{}", HOMEPAGE, clean_path) }
7}
8
9#[cfg(test)]
10mod tests {
11 use super::*;
12 #[test]
13 fn builds_url() {
14 assert_eq!(build_url("/pricing"), "https://ailearnhub.net/pricing");
15 }
16}