diff --git a/CHANGELOG.md b/CHANGELOG.md index a8839ba..2601182 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,9 @@ - Fix sitemaps namespace - Update livereload - Add `hard_link_static` config option to hard link things in the static directory instead of copying -- Draft pages are not longer rendered +- Draft pages are not longer rendered in `zola build` - Add warning for old style internal links since they would still function +- Add some counts to `zola check` ## 0.8.0 (2019-06-22) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 262d4a4..65011a3 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -229,7 +229,8 @@ impl Site { let mut pages_insert_anchors = HashMap::new(); for page in pages { let p = page?; - if p.meta.draft { + // Draft pages are not rendered in zola build so we just discard them + if p.meta.draft && self.config.is_in_build_mode() { continue; } pages_insert_anchors.insert( diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index ab6cbef..7b1627f 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -130,6 +130,7 @@ fn create_new_site( format!("http://{}", base_address) }; + site.config.enable_serve_mode(); site.set_base_url(base_url); site.set_output_path(output_dir); site.load()?;