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::footnote_definition::RenderRealFootnoteDefinition;
|
||||||
use super::GlobalSettings;
|
use super::GlobalSettings;
|
||||||
|
use super::PageHeader;
|
||||||
use super::RenderDocumentElement;
|
use super::RenderDocumentElement;
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
@ -10,6 +11,8 @@ use super::RenderDocumentElement;
|
|||||||
pub(crate) struct RenderBlogPostPage {
|
pub(crate) struct RenderBlogPostPage {
|
||||||
global_settings: GlobalSettings,
|
global_settings: GlobalSettings,
|
||||||
|
|
||||||
|
page_header: Option<PageHeader>,
|
||||||
|
|
||||||
/// The title that will be shown visibly on the page.
|
/// The title that will be shown visibly on the page.
|
||||||
title: Option<String>,
|
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.
|
// 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(
|
pub(crate) fn new(
|
||||||
global_settings: GlobalSettings,
|
global_settings: GlobalSettings,
|
||||||
|
page_header: Option<PageHeader>,
|
||||||
title: Option<String>,
|
title: Option<String>,
|
||||||
self_link: Option<String>,
|
self_link: Option<String>,
|
||||||
children: Vec<RenderDocumentElement>,
|
children: Vec<RenderDocumentElement>,
|
||||||
@ -31,6 +35,7 @@ impl RenderBlogPostPage {
|
|||||||
) -> RenderBlogPostPage {
|
) -> RenderBlogPostPage {
|
||||||
RenderBlogPostPage {
|
RenderBlogPostPage {
|
||||||
global_settings,
|
global_settings,
|
||||||
|
page_header,
|
||||||
title,
|
title,
|
||||||
self_link,
|
self_link,
|
||||||
children,
|
children,
|
||||||
|
@ -81,6 +81,7 @@ pub(crate) fn convert_blog_post_page_to_render_context<D: AsRef<Path>, F: AsRef<
|
|||||||
|
|
||||||
let ret = RenderBlogPostPage::new(
|
let ret = RenderBlogPostPage::new(
|
||||||
global_settings,
|
global_settings,
|
||||||
|
Some(page_header),
|
||||||
page.title.clone(),
|
page.title.clone(),
|
||||||
Some(link_to_blog_post),
|
Some(link_to_blog_post),
|
||||||
children,
|
children,
|
||||||
|
Loading…
Reference in New Issue
Block a user