summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites_build.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-21 13:55:08 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-21 13:56:20 +0100
commit2cbdd65330a727ae172b11b4b9dc96f675e1bb19 (patch)
tree79ab97c8642aa41dbaf29e15ee432c4e4018bf35 /hugolib/hugo_sites_build.go
parent4e77c8717b18b8b54f4e56cb305da6cf3bc26be7 (diff)
tpl, hugolib: Fix live-reload of non-renderable content pages
Fixes #3062
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r--hugolib/hugo_sites_build.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index ce2c3b941..2e54cb7a8 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -107,6 +107,13 @@ func (h *HugoSites) initRebuild(config *BuildCfg) error {
h.runMode.Watching = config.Watching
+ if config.whatChanged.source {
+ // This is for the non-renderable content pages (rarely used, I guess).
+ // We could maybe detect if this is really needed, but it should be
+ // pretty fast.
+ h.Tmpl.RebuildClone()
+ }
+
for _, s := range h.Sites {
s.resetBuildState()
}