MCPcopy Create free account
hub / github.com/PerroEngine/Perro / public_base_url

Function public_base_url

perro_website/src/main.rs:367–390  ·  view source on GitHub ↗
(headers: &axum::http::HeaderMap)

Source from the content-addressed store, hash-verified

365struct SitemapUrl {
366 path: String,
367 changefreq: &'static str,
368 priority: &'static str,
369}
370
371#[cfg(feature = "ssr")]
372impl 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")]
383fn 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")]

Callers 2

robots_txtFunction · 0.85
sitemap_xmlFunction · 0.85

Calls 3

okMethod · 0.80
is_emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected