required data prefix to extra data in templates now

resolves #12 and #13
This commit is contained in:
zyl 2024-11-13 08:35:11 -08:00
parent 281a181958
commit 83c5f6038f
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
4 changed files with 19 additions and 20 deletions

View file

@ -29,8 +29,7 @@ struct TemplateData<'a, T> {
/// the page's custom styles.
pub styles: &'a [String],
/// Custom template data.
#[serde(flatten)]
pub extra_data: T,
pub data: T,
}
/// Struct used to build the site.
@ -303,7 +302,7 @@ impl SiteBuilder {
head,
scripts: &page_metadata.scripts,
styles: &page_metadata.styles,
extra_data,
data: extra_data,
})?,
)?;