Render draft pages in serve mode
This commit is contained in:
parent
a923f7005f
commit
7c3a112d7d
|
@ -6,8 +6,9 @@
|
||||||
- Fix sitemaps namespace
|
- Fix sitemaps namespace
|
||||||
- Update livereload
|
- Update livereload
|
||||||
- Add `hard_link_static` config option to hard link things in the static directory instead of copying
|
- 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 warning for old style internal links since they would still function
|
||||||
|
- Add some counts to `zola check`
|
||||||
|
|
||||||
## 0.8.0 (2019-06-22)
|
## 0.8.0 (2019-06-22)
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,8 @@ impl Site {
|
||||||
let mut pages_insert_anchors = HashMap::new();
|
let mut pages_insert_anchors = HashMap::new();
|
||||||
for page in pages {
|
for page in pages {
|
||||||
let p = page?;
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
pages_insert_anchors.insert(
|
pages_insert_anchors.insert(
|
||||||
|
|
|
@ -130,6 +130,7 @@ fn create_new_site(
|
||||||
format!("http://{}", base_address)
|
format!("http://{}", base_address)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
site.config.enable_serve_mode();
|
||||||
site.set_base_url(base_url);
|
site.set_base_url(base_url);
|
||||||
site.set_output_path(output_dir);
|
site.set_output_path(output_dir);
|
||||||
site.load()?;
|
site.load()?;
|
||||||
|
|
Loading…
Reference in a new issue