Introduce a new config struct the lives above the raw disk implementation.

This should let us include values that would not be written to disk like the folder containing the config.
This commit is contained in:
Tom Alexander
2023-10-18 21:25:37 -04:00
parent 6668af2025
commit 672ca07a0e
6 changed files with 52 additions and 15 deletions

20
src/config/raw.rs Normal file
View File

@@ -0,0 +1,20 @@
use serde::Deserialize;
use serde::Serialize;
/// This is the struct for the writer.toml config file that ends up in each site's root directory.
#[derive(Deserialize, Serialize)]
pub(crate) struct RawConfig {
site_title: String,
author: Option<String>,
email: Option<String>,
}
impl Default for RawConfig {
fn default() -> Self {
RawConfig {
site_title: "My super awesome website".to_owned(),
author: None,
email: None,
}
}
}