diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 9241772b2c2..11e7bfa4ee5 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -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 } diff --git a/hugolib/page.go b/hugolib/page.go index c00070c9aea..629b90484be 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -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 diff --git a/hugolib/page_bundler.go b/hugolib/page_bundler.go index 9ebfe1b8870..fc135f6b7ee 100644 --- a/hugolib/page_bundler.go +++ b/hugolib/page_bundler.go @@ -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)