URI: 
       hugolib: Re-work "fast render" logic in the new flow - hugo - [fork] hugo port for 9front
  HTML git clone git@git.drkhsh.at/hugo.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit d0d661dffd19d5ed6efbd4dd2c572bad008bd859
   DIR parent 4494a01b794ab785c64c8e93c61ccbfa845bc478
  HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
       Date:   Thu,  4 Apr 2019 12:37:55 +0200
       
       hugolib: Re-work "fast render" logic in the new flow
       
       Note that this fixes some "live reload" issues recently introduced in non-released code.
       
       Closes #5811
       See #5784
       
       Diffstat:
         M hugolib/hugo_sites.go               |       5 ++++-
         M hugolib/hugo_sites_build.go         |       6 ++----
         M hugolib/pagebundler.go              |       5 +++--
       
       3 files changed, 9 insertions(+), 7 deletions(-)
       ---
   DIR diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
       @@ -569,7 +569,6 @@ func (cfg *BuildCfg) shouldRender(p *pageState) bool {
                        return false
                }
                if p.forceRender {
       -                p.forceRender = false
                        return true
                }
        
       @@ -577,6 +576,10 @@ func (cfg *BuildCfg) shouldRender(p *pageState) bool {
                        return true
                }
        
       +        if cfg.RecentlyVisited[p.RelPermalink()] {
       +                return true
       +        }
       +
                if cfg.whatChanged != nil && !p.File().IsZero() {
                        return cfg.whatChanged.files[p.File().Filename()]
                }
   DIR diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
       @@ -288,10 +288,8 @@ func (h *HugoSites) render(config *BuildCfg) error {
                                                // needs this set.
                                                s2.rc = &siteRenderingContext{Format: renderFormat}
        
       -                                        if !config.PartialReRender {
       -                                                if err := s2.preparePagesForRender(siteRenderContext.sitesOutIdx); err != nil {
       -                                                        return err
       -                                                }
       +                                        if err := s2.preparePagesForRender(siteRenderContext.sitesOutIdx); err != nil {
       +                                                return err
                                                }
                                        }
        
   DIR diff --git a/hugolib/pagebundler.go b/hugolib/pagebundler.go
       @@ -110,8 +110,9 @@ func (s *siteContentProcessor) process(ctx context.Context) error {
                                        panic(fmt.Sprintf("invalid page site: %v vs %v", p.s, s))
                                }
        
       -                        if s.partialBuild {
       -                                p.forceRender = true
       +                        p.forceRender = s.partialBuild
       +
       +                        if p.forceRender {
                                        s.site.replacePage(p)
                                } else {
                                        s.site.addPage(p)