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>,
pub search_wasm: Option<String>,
pub search_bin: Option<String>,
pub base_path: String,
pub og_image: Option<String>,
pub accent: 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).
search_wasm: Option<String>The docs_search.wasm reader module URL (site-relative; wasm-first search). Empty/absent = the island falls back to JSON scoring.
search_bin: Option<String>The FST binary index URL (site-relative; reader input).
base_path: StringURL path prefix for all site-relative links (subpath hosting,
e.g. /solid-fx/preview). Empty string = served at root.
og_image: Option<String>Open Graph image URL, emitted as og:image + twitter:image.
accent: Option<String>Accent color as #rgb/#rrggbb hex, overriding --accent in
the chrome palette (both themes; light gets a darkened variant).
Absent/invalid = the default palette.
Implementations§
Source§impl SiteConfig
impl SiteConfig
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 SiteConfigwhere
RawVecInner: Send,
impl Sync for SiteConfigwhere
RawVecInner: Sync,
impl Unpin for SiteConfig
impl UnsafeUnpin for SiteConfig
impl UnwindSafe for SiteConfigwhere
RawVecInner: UnwindSafe,
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