hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 8c840480336de030471fffb09623fbc124809dcb
parent ad176055d9e87c02da4be405210b297036dd2500
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sun, 14 Feb 2016 15:16:55 +0100

Force full rebuild when site config changes

Fixes #1840

Diffstat:
Mcommands/hugo.go | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/commands/hugo.go b/commands/hugo.go
@@ -467,6 +467,8 @@ func watchConfig() {
 	viper.WatchConfig()
 	viper.OnConfigChange(func(e fsnotify.Event) {
 		fmt.Println("Config file changed:", e.Name)
+		// Force a full rebuild
+		MainSite = nil
 		utils.CheckErr(buildSite(true))
 		if !viper.GetBool("DisableLiveReload") {
 			// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized