ref: 2247546017c00201d2ce1232dd5303295451f1cc
parent: d139a037d98e4b388687eecb7831758412247c58
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Aug 16 06:58:05 EDT 2018
hugolib: Force render of any changed page, even in Fast Render Mode Fixes #5083
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -366,6 +366,11 @@
// Note that a page does not have to have a content page / file.
// For regular builds, this will allways return true.
func (cfg *BuildCfg) shouldRender(p *Page) bool {
+ if p.forceRender {
+ p.forceRender = false
+ return true
+ }
+
if len(cfg.RecentlyVisited) == 0 {
return true
}
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -265,6 +265,11 @@
lang string
+ // When in Fast Render Mode, we only render a sub set of the pages, i.e. the
+ // pages the user is working on. There are, however, situations where we need to
+ // signal other pages to be rendered.
+ forceRender bool
+
// The output formats this page will be rendered to.
outputFormats output.Formats
--- a/hugolib/page_bundler.go
+++ b/hugolib/page_bundler.go
@@ -110,6 +110,7 @@
}
if s.partialBuild {
+ p.forceRender = true
s.site.replacePage(p)
} else {
s.site.addPage(p)