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
This commit is contained in:
Bjørn Erik Pedersen
2019-04-04 12:37:55 +02:00
parent 4494a01b79
commit d0d661dffd
3 changed files with 9 additions and 7 deletions

View File

@@ -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()]
}