pub struct SiteConfig {
pub base_url: String,
pub site_title: String,
pub author: String,
pub ai_crawlers: String,
pub stylesheet: Option<String>,
pub island_shim: Option<String>,
pub search_island: Option<String>,
}Expand description
Site-wide settings, from site.toml in the source root.
Fields§
§base_url: StringAbsolute origin for canonical URLs, sitemap, and llms.txt
(https://docs.example.com, no trailing slash).
site_title: StringSite title (llms.txt heading, JSON-LD isPartOf).
Named author (E-E-A-T: real names beat anonymous).
ai_crawlers: StringAI-crawler policy, recorded in robots.txt: "allow" (default),
"block-training", "block-all".
stylesheet: Option<String>Stylesheet URL emitted as a <link rel="stylesheet"> in every
page head (e.g. the islands’ Tailwind build).
island_shim: Option<String>The island shim module URL, emitted as a deferred module script
in every page head (registers <docs-island>).
search_island: Option<String>The search island chunk URL, emitted as a search trigger in the
header (props point at /search.json).
Implementations§
Source§impl SiteConfig
impl SiteConfig
Sourcepub fn load(src: &Path) -> Option<SiteConfig>
pub fn load(src: &Path) -> Option<SiteConfig>
Parse site.toml if present: key = "value" scalar lines only.
base_url is the one required key; the rest have defaults.
Trait Implementations§
Source§impl Clone for SiteConfig
impl Clone for SiteConfig
Source§impl Debug for SiteConfig
impl Debug for SiteConfig
Source§impl PartialEq for SiteConfig
impl PartialEq for SiteConfig
impl StructuralPartialEq for SiteConfig
Auto Trait Implementations§
impl Forget for SiteConfig
impl Freeze for SiteConfig
impl Move for SiteConfig
impl RefUnwindSafe for SiteConfig
impl Send for SiteConfig
impl Sync for SiteConfig
impl Unpin for SiteConfig
impl UnsafeUnpin for SiteConfig
impl UnwindSafe for SiteConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
self file descriptor. Read moreSource§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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more