mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -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
|
||||
|
Reference in New Issue
Block a user