(headers: &axum::http::HeaderMap)
| 365 | struct SitemapUrl { |
| 366 | path: String, |
| 367 | changefreq: &'static str, |
| 368 | priority: &'static str, |
| 369 | } |
| 370 | |
| 371 | #[cfg(feature = "ssr")] |
| 372 | impl SitemapUrl { |
| 373 | fn new(path: impl Into<String>, changefreq: &'static str, priority: &'static str) -> Self { |
| 374 | Self { |
| 375 | path: path.into(), |
| 376 | changefreq, |
| 377 | priority, |
| 378 | } |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | #[cfg(feature = "ssr")] |
| 383 | fn doc_priority(doc: &perro_website_lib::docs::DocPage) -> &'static str { |
| 384 | if doc.slug.starts_with("examples/") || doc.area == "book" { |
| 385 | "0.8" |
| 386 | } else if doc.slug.contains("nodes") || doc.area == "scripting" { |
| 387 | "0.7" |
| 388 | } else { |
| 389 | "0.6" |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | #[cfg(feature = "ssr")] |
no test coverage detected