Add the page header to the render context.
This commit is contained in:
parent
35dbab0ceb
commit
c98489cacb
@ -2,6 +2,7 @@ use serde::Serialize;
|
||||
|
||||
use super::footnote_definition::RenderRealFootnoteDefinition;
|
||||
use super::GlobalSettings;
|
||||
use super::PageHeader;
|
||||
use super::RenderDocumentElement;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
@ -10,6 +11,8 @@ use super::RenderDocumentElement;
|
||||
pub(crate) struct RenderBlogPostPage {
|
||||
global_settings: GlobalSettings,
|
||||
|
||||
page_header: Option<PageHeader>,
|
||||
|
||||
/// The title that will be shown visibly on the page.
|
||||
title: Option<String>,
|
||||
|
||||
@ -24,6 +27,7 @@ impl RenderBlogPostPage {
|
||||
// TODO: Maybe these settings should be moved into a common struct so this can have the same type signature as the others.
|
||||
pub(crate) fn new(
|
||||
global_settings: GlobalSettings,
|
||||
page_header: Option<PageHeader>,
|
||||
title: Option<String>,
|
||||
self_link: Option<String>,
|
||||
children: Vec<RenderDocumentElement>,
|
||||
@ -31,6 +35,7 @@ impl RenderBlogPostPage {
|
||||
) -> RenderBlogPostPage {
|
||||
RenderBlogPostPage {
|
||||
global_settings,
|
||||
page_header,
|
||||
title,
|
||||
self_link,
|
||||
children,
|
||||
|
@ -81,6 +81,7 @@ pub(crate) fn convert_blog_post_page_to_render_context<D: AsRef<Path>, F: AsRef<
|
||||
|
||||
let ret = RenderBlogPostPage::new(
|
||||
global_settings,
|
||||
Some(page_header),
|
||||
page.title.clone(),
|
||||
Some(link_to_blog_post),
|
||||
children,
|
||||
|
Loading…
x
Reference in New Issue
Block a user