mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-26 02:03:04 +00: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