Add publish filter to blog posts and pages.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
use super::blog_post_page::get_date;
|
||||
use super::blog_post_page::get_publish_status;
|
||||
use super::blog_post_page::get_title;
|
||||
use super::footnote_definition::IRealFootnoteDefinition;
|
||||
use super::macros::intermediate;
|
||||
use super::IDocumentElement;
|
||||
use super::IHeading;
|
||||
use super::ISection;
|
||||
use super::PublishStatus;
|
||||
use crate::error::CustomError;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -24,6 +26,8 @@ pub(crate) struct IPage {
|
||||
pub(crate) children: Vec<IDocumentElement>,
|
||||
|
||||
pub(crate) footnotes: Vec<IRealFootnoteDefinition>,
|
||||
|
||||
pub(crate) natter_publish: PublishStatus,
|
||||
}
|
||||
|
||||
intermediate!(
|
||||
@@ -69,6 +73,7 @@ intermediate!(
|
||||
date: get_date(original.document),
|
||||
children,
|
||||
footnotes,
|
||||
natter_publish: get_publish_status(original.document).unwrap_or_default(),
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user