mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Force render of any changed page, even in Fast Render Mode
Fixes #5083
This commit is contained in:
parent
d139a037d9
commit
2247546017
3 changed files with 11 additions and 0 deletions
|
@ -366,6 +366,11 @@ type BuildCfg struct {
|
|||
// 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
|
||||
}
|
||||
|
|
|
@ -265,6 +265,11 @@ type Page struct {
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ func (s *siteContentProcessor) process(ctx context.Context) error {
|
|||
}
|
||||
|
||||
if s.partialBuild {
|
||||
p.forceRender = true
|
||||
s.site.replacePage(p)
|
||||
} else {
|
||||
s.site.addPage(p)
|
||||
|
|
Loading…
Reference in a new issue