summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-08-15 20:41:19 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-08-16 12:54:59 +0200
commitd139a037d98e4b388687eecb7831758412247c58 (patch)
treee1057555939aec646f859cdc7247701c4fc00438 /hugolib/hugo_sites.go
parent0a88741fe85f4f7aedc02ed748dfeb8ccc073dbf (diff)
hugoblib: Fix "adding a bundle" in server mode
Before this commit, the live reload logic in `hugo server` got confused when you dropped a new bundle into the project while the server was running. The workaround was to restart the server. This commit fixes the "live reload bundle detection" in server mode, and also makes sure that the bundle headers are always processed first. Fixes #5075
Diffstat (limited to 'hugolib/hugo_sites.go')
-rw-r--r--hugolib/hugo_sites.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
index 6ce6657fa..9241772b2 100644
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -740,6 +740,11 @@ func (m *contentChangeMap) resolveAndRemove(filename string) (string, string, bu
}
}
+ if isContent && fileTp != bundleNot {
+ // A new bundle.
+ return dir, dir, fileTp
+ }
+
// Not part of any bundle
return dir, filename, bundleNot
}