Create a page header struct.
This commit is contained in:
@@ -67,4 +67,8 @@ impl Config {
|
||||
pub(crate) fn get_web_root(&self) -> Option<&str> {
|
||||
self.raw.web_root.as_deref()
|
||||
}
|
||||
|
||||
pub(crate) fn get_site_title(&self) -> Option<&str> {
|
||||
self.raw.site_title.as_deref()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ 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,
|
||||
pub(super) site_title: Option<String>,
|
||||
author: Option<String>,
|
||||
email: Option<String>,
|
||||
pub(super) use_relative_paths: Option<bool>,
|
||||
@@ -14,7 +14,7 @@ pub(crate) struct RawConfig {
|
||||
impl Default for RawConfig {
|
||||
fn default() -> Self {
|
||||
RawConfig {
|
||||
site_title: "My super awesome website".to_owned(),
|
||||
site_title: None,
|
||||
author: None,
|
||||
email: None,
|
||||
use_relative_paths: None,
|
||||
|
||||
Reference in New Issue
Block a user