mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
ad176055d9
commit
8c84048033
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue