pub struct SiteConfig {
pub site_title: String,
pub assets_dir: String,
pub site_description_file: String,
pub colors: ColorConfig,
pub thumbnails: ThumbnailsConfig,
pub full_index: FullIndexConfig,
pub images: ImagesConfig,
pub theme: ThemeConfig,
pub font: FontConfig,
pub processing: ProcessingConfig,
}Expand description
Site configuration loaded from config.toml.
All fields have sensible defaults. User config files need only specify the values they want to override. Unknown keys are rejected.
Fields§
§site_title: StringSite title used in breadcrumbs and the browser tab for the home page.
assets_dir: StringDirectory for static assets (favicon, fonts, etc.), relative to content root. Contents are copied verbatim to the output root during generation.
site_description_file: StringStem of the site description file in the content root (e.g. “site” →
looks for site.md / site.txt). Rendered on the index page.
colors: ColorConfigColor schemes for light and dark modes.
thumbnails: ThumbnailsConfigThumbnail generation settings (aspect ratio).
full_index: FullIndexConfigSite-wide “All Photos” index settings.
images: ImagesConfigResponsive image generation settings (sizes, quality).
theme: ThemeConfigTheme/layout settings (frame padding, grid spacing).
font: FontConfigFont configuration (Google Fonts or local font file).
processing: ProcessingConfigParallel processing settings.
Implementations§
Source§impl SiteConfig
impl SiteConfig
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate config values are within acceptable ranges.
Sourcepub fn merge(self, other: PartialSiteConfig) -> Self
pub fn merge(self, other: PartialSiteConfig) -> Self
Merge a partial config on top of this one.
Trait Implementations§
Source§impl Clone for SiteConfig
impl Clone for SiteConfig
Source§fn clone(&self) -> SiteConfig
fn clone(&self) -> SiteConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SiteConfig
impl Debug for SiteConfig
Source§impl Default for SiteConfig
impl Default for SiteConfig
Source§impl<'de> Deserialize<'de> for SiteConfigwhere
SiteConfig: Default,
impl<'de> Deserialize<'de> for SiteConfigwhere
SiteConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SiteConfig
impl PartialEq for SiteConfig
Source§impl Serialize for SiteConfig
impl Serialize for SiteConfig
impl StructuralPartialEq for SiteConfig
Auto Trait Implementations§
impl Freeze 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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