2023-10-18 20:06:30 -04:00
|
|
|
use serde::Deserialize;
|
|
|
|
use serde::Serialize;
|
|
|
|
|
2023-10-18 19:59:45 -04:00
|
|
|
/// This is the struct for the writer.toml config file that ends up in each site's root directory.
|
2023-10-18 20:06:30 -04:00
|
|
|
#[derive(Deserialize, Serialize)]
|
2023-10-18 19:59:45 -04:00
|
|
|
pub(crate) struct Config {
|
2023-10-18 20:30:32 -04:00
|
|
|
site_title: String,
|
|
|
|
author: Option<String>,
|
|
|
|
email: Option<String>,
|
2023-10-18 19:59:45 -04:00
|
|
|
}
|
2023-10-18 20:30:32 -04:00
|
|
|
|
2023-10-18 20:21:28 -04:00
|
|
|
impl Default for Config {
|
|
|
|
fn default() -> Self {
|
2023-10-18 20:30:32 -04:00
|
|
|
Config {
|
|
|
|
site_title: "My super awesome website".to_owned(),
|
|
|
|
author: None,
|
|
|
|
email: None,
|
|
|
|
}
|
2023-10-18 20:21:28 -04:00
|
|
|
}
|
|
|
|
}
|