feat: add TOML site config for metadata
- Cargo.toml: Add toml and serde dependencies - site.toml: New config with title, author, base_url - src/config.rs: SiteConfig struct with load() function - src/error.rs: Add Error::Config for parse errors - src/main.rs: Load site.toml, thread config and page paths through generators - src/templates.rs: Use config.title in nav/titles, config.author in footer, config.base_url for canonical URLs. All three config fields verified in generated HTML output.
This commit is contained in:
@@ -36,6 +36,10 @@ pub enum Error {
|
||||
/// Content directory not found.
|
||||
#[error("content directory not found: {0}")]
|
||||
ContentDirNotFound(PathBuf),
|
||||
|
||||
/// Failed to parse configuration file.
|
||||
#[error("invalid config in {path}: {message}")]
|
||||
Config { path: PathBuf, message: String },
|
||||
}
|
||||
|
||||
/// Result type alias for compiler operations.
|
||||
|
||||
Reference in New Issue
Block a user