pub struct SeoRouter { /* private fields */ }Expand description
Builder for the crawler-facing routes of a docs/blog site.
Generated routes:
| Route | Condition | Content |
|---|---|---|
<docs_path>/<page>.md | docs | raw Markdown per doc page |
/llms.txt, /llms-full.txt | docs | LLM-friendly docs index / full corpus |
/sitemap-docs.xml | docs | docs sitemap |
<blog_path>/<slug>.md | blog | raw Markdown per post |
<blog_path>/rss.xml | blog | RSS feed |
/sitemap-blog.xml | blog | blog sitemap |
/sitemap.xml | always | sitemap index over the above |
/robots.txt | always | allow-all incl. explicit AI-crawler entries |
Implementations§
Source§impl SeoRouter
impl SeoRouter
Sourcepub fn new(site_url: &str, site_title: &str, site_description: &str) -> Self
pub fn new(site_url: &str, site_title: &str, site_description: &str) -> Self
Create a builder.
site_url: public origin, e.g."https://example.com"(no trailing slash needed).site_title/site_description: used inllms.txtheaders and the RSS channel.
Sourcepub fn with_docs(self, registry: &'static DocsRegistry, base_path: &str) -> Self
pub fn with_docs(self, registry: &'static DocsRegistry, base_path: &str) -> Self
Serve docs endpoints for registry, mounted under base_path (e.g. "/docs").
Sourcepub fn with_blog(self, registry: &'static BlogRegistry, base_path: &str) -> Self
pub fn with_blog(self, registry: &'static BlogRegistry, base_path: &str) -> Self
Serve blog endpoints for registry, mounted under base_path (e.g. "/blog").
Sourcepub fn into_router(self) -> Router
pub fn into_router(self) -> Router
Build the Axum router. Merge it into your app router with
Router::merge.
Auto Trait Implementations§
impl Freeze for SeoRouter
impl RefUnwindSafe for SeoRouter
impl Send for SeoRouter
impl Sync for SeoRouter
impl Unpin for SeoRouter
impl UnsafeUnpin for SeoRouter
impl UnwindSafe for SeoRouter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.