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