mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 11:05:40 +00:00
sitemap generates URL
This commit is contained in:
@@ -26,12 +26,19 @@ use crate::PAGES;
|
||||
#[template(path = "sitemap.html")]
|
||||
struct IndexPage {
|
||||
urls: [&'static str; 7],
|
||||
domain: &'static str,
|
||||
}
|
||||
|
||||
impl Default for IndexPage {
|
||||
fn default() -> Self {
|
||||
let urls = Routes::get_sitemap();
|
||||
Self { urls }
|
||||
let domain = if crate::SETTINGS.server.domain.ends_with('/') {
|
||||
&crate::SETTINGS.server.domain[0..crate::SETTINGS.server.domain.len() - 1]
|
||||
} else {
|
||||
&crate::SETTINGS.server.domain
|
||||
};
|
||||
|
||||
Self { urls, domain }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user