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:
20
src/config/raw.rs
Normal file
20
src/config/raw.rs
Normal 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user