diff --git a/src/html.rs b/src/html.rs index 600fda6..68da96e 100644 --- a/src/html.rs +++ b/src/html.rs @@ -133,7 +133,9 @@ impl<'s> Writer<'s> { // {{{ Section Container::Section { id } => { if self.metadata.title.id == *id { - if matches!(self.metadata.route, PageRoute::Post(_)) { + if matches!(self.metadata.route, PageRoute::Post(_)) + && !self.metadata.config.compact + { let mut renderer = template!("templates/post.html", out)?; assert_eq!(renderer.current(), Some("attrs")); diff --git a/src/metadata.rs b/src/metadata.rs index 78cc5f0..b929580 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -28,6 +28,10 @@ pub struct PageConfig { #[serde(default)] pub draft: bool, + + /// Hides away the traditional header + #[serde(default)] + pub compact: bool, } impl PageConfig { @@ -73,6 +77,7 @@ impl PageConfig { self.sitemap_exclude |= other.sitemap_exclude; self.hidden |= other.hidden; self.draft |= other.draft; + self.compact |= other.compact; Ok(()) }