Don't inject livereload script on hugo -w

Fixes #11061
This commit is contained in:
Bjørn Erik Pedersen 2023-06-02 07:49:42 +02:00
parent 382c726e63
commit a191b38ac8
2 changed files with 2 additions and 1 deletions

View file

@ -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()
}

View file

@ -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