diff --git a/hugolib/site.go b/hugolib/site.go index d23a90385..19821e8b2 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1064,7 +1064,7 @@ func (s *Site) renderAndWritePage(statCounter *uint64, name string, targetPath s pd.AbsURLPath = s.absURLPath(targetPath) } - if s.watching() && s.conf.Internal.Watch && !s.conf.Internal.DisableLiveReload { + if s.watching() && s.conf.Internal.Running && !s.conf.Internal.DisableLiveReload { pd.LiveReloadBaseURL = s.Conf.BaseURLLiveReload().URL() } diff --git a/testscripts/commands/hugo__watch.txt b/testscripts/commands/hugo__watch.txt index b434bd112..aa5201c56 100644 --- a/testscripts/commands/hugo__watch.txt +++ b/testscripts/commands/hugo__watch.txt @@ -11,6 +11,7 @@ grep 'P1start' public/p1/index.html replace content/p1.md 'P1start' 'P1end' sleep 2 grep 'P1end' public/p1/index.html +! grep 'livereload' public/p1/index.html stop