implement custom userdata, resolves #11

This commit is contained in:
zyl 2024-11-13 12:29:26 -08:00
parent 6c31ccb9d5
commit 95a0765b1e
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
4 changed files with 35 additions and 0 deletions

View file

@ -24,6 +24,8 @@ struct TemplateData<'a, T> {
pub title: &'a str,
/// Custom template data.
pub data: T,
/// Userdata supplied from the page.
pub userdata: serde_yml::Value,
}
/// Struct used to build the site.
@ -320,6 +322,7 @@ impl SiteBuilder {
page: page_html,
title: &title,
data: extra_data,
userdata: page_metadata.userdata,
})?,
)?;