Create a struct that will combine all the context for converting intermediate objects into the dust render context.
This commit is contained in:
@@ -8,6 +8,7 @@ use crate::error::CustomError;
|
||||
use super::raw::RawConfig;
|
||||
|
||||
/// This is the config struct used by most of the code, which is an interpreted version of the RawConfig struct which is the raw disk-representation of the config.
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Config {
|
||||
raw: RawConfig,
|
||||
config_path: PathBuf,
|
||||
|
||||
@@ -2,7 +2,7 @@ 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)]
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub(crate) struct RawConfig {
|
||||
pub(super) site_title: Option<String>,
|
||||
author: Option<String>,
|
||||
@@ -25,7 +25,7 @@ impl Default for RawConfig {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub(crate) struct RawConfigStream {
|
||||
pub(super) entries_per_page: Option<usize>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user