mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 10:36:39 -07:00
required data
prefix to extra data in templates now
resolves #12 and #13
This commit is contained in:
parent
281a181958
commit
83c5f6038f
4 changed files with 19 additions and 20 deletions
|
@ -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,
|
||||
})?,
|
||||
)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue