mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Fix #593 problem with hugo -w
This commit is contained in:
parent
c1942e915a
commit
f3e9cbc7bd
1 changed files with 3 additions and 3 deletions
|
@ -352,10 +352,10 @@ func NewWatcher(port int) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if static_changed {
|
if static_changed {
|
||||||
fmt.Print("Static file changed, syncing\n\n")
|
jww.FEEDBACK.Println("Static file changed, syncing\n")
|
||||||
utils.StopOnErr(copyStatic(), fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
|
utils.StopOnErr(copyStatic(), fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
|
||||||
|
|
||||||
if !viper.GetBool("DisableLiveReload") {
|
if !BuildWatch && !viper.GetBool("DisableLiveReload") {
|
||||||
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized
|
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized
|
||||||
|
|
||||||
// force refresh when more than one file
|
// force refresh when more than one file
|
||||||
|
@ -376,7 +376,7 @@ func NewWatcher(port int) error {
|
||||||
fmt.Println(time.Now().Format(layout))
|
fmt.Println(time.Now().Format(layout))
|
||||||
utils.StopOnErr(buildSite(true))
|
utils.StopOnErr(buildSite(true))
|
||||||
|
|
||||||
if !viper.GetBool("DisableLiveReload") {
|
if !BuildWatch && !viper.GetBool("DisableLiveReload") {
|
||||||
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized
|
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized
|
||||||
livereload.ForceRefresh()
|
livereload.ForceRefresh()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue