diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-02-14 15:16:55 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-02-14 15:16:55 +0100 |
commit | 8c840480336de030471fffb09623fbc124809dcb (patch) | |
tree | 3dd6a284bbaad076c1de3d4543462ad236aa93fc /commands | |
parent | ad176055d9e87c02da4be405210b297036dd2500 (diff) |
Force full rebuild when site config changes
Fixes #1840
Diffstat (limited to 'commands')
-rw-r--r-- | commands/hugo.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index f363cc7a0..83dae0d11 100644 --- 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 |