mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-27 03:50:59 +00:00
parent
ad176055d9
commit
8c84048033
1 changed files with 2 additions and 0 deletions
|
@ -467,6 +467,8 @@ func watchConfig() {
|
||||||
viper.WatchConfig()
|
viper.WatchConfig()
|
||||||
viper.OnConfigChange(func(e fsnotify.Event) {
|
viper.OnConfigChange(func(e fsnotify.Event) {
|
||||||
fmt.Println("Config file changed:", e.Name)
|
fmt.Println("Config file changed:", e.Name)
|
||||||
|
// Force a full rebuild
|
||||||
|
MainSite = nil
|
||||||
utils.CheckErr(buildSite(true))
|
utils.CheckErr(buildSite(true))
|
||||||
if !viper.GetBool("DisableLiveReload") {
|
if !viper.GetBool("DisableLiveReload") {
|
||||||
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized
|
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized
|
||||||
|
|
Loading…
Reference in a new issue