pub struct Config {
pub content_dir: PathBuf,
pub output_dir: PathBuf,
pub storage: Option<StorageConfig>,
pub published: Option<bool>,
pub theme: Option<ThemeId>,
pub internal_link_target: Option<String>,
pub preamble: Option<String>,
pub platforms: HashMap<String, PlatformConfig>,
}Expand description
Main configuration structure
Fields§
§content_dir: PathBuf§output_dir: PathBuf§storage: Option<StorageConfig>Global storage configuration for External asset strategy Per [[RFC-0004:C-STORAGE-CONFIG]]
published: Option<bool>Global default for published state (layer 4 per [[RFC-0005:C-RESOLUTION-ORDER]])
theme: Option<ThemeId>Global default theme (layer 4 in theme resolution chain)
internal_link_target: Option<String>Global default platform for internal link resolution in copypaste adapters.
Per-post internal_link_target in meta.toml overrides this.
If neither is set, auto-selects first published platform alphabetically.
preamble: Option<String>Global Typst render preamble override (layer 4 per [[RFC-0005:C-RESOLUTION-ORDER]]).
platforms: HashMap<String, PlatformConfig>Implementations§
Source§impl Config
impl Config
Sourcepub fn load(path: &Path) -> Result<ConfigLoadResult>
pub fn load(path: &Path) -> Result<ConfigLoadResult>
Load configuration from a file.
Returns ConfigLoadResult::DefaultsUsed if the file does not exist,
allowing the caller to decide how to handle the warning.
Sourcepub fn load_or_default(path: &Path) -> Result<Config>
pub fn load_or_default(path: &Path) -> Result<Config>
Load configuration, returning defaults if file not found.
This is a convenience method that discards the “defaults used” information.
Use load() if you need to know whether defaults were used.
Sourcepub fn get_platform(&self, id: &str) -> Option<&PlatformConfig>
pub fn get_platform(&self, id: &str) -> Option<&PlatformConfig>
Get platform configuration by ID
Sourcepub fn default_platforms(&self) -> Vec<(&str, &PlatformConfig)>
pub fn default_platforms(&self) -> Vec<(&str, &PlatformConfig)>
Get platforms that should be targeted by default (present and not disabled).