Skip to content

Commit

Permalink
Don't inject livereload script on hugo -w
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jun 2, 2023
1 parent 382c726 commit 5fb2e85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hugolib/site.go
Expand Up @@ -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()
}

Expand Down
1 change: 1 addition & 0 deletions testscripts/commands/hugo__watch.txt
Expand Up @@ -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

Expand Down

0 comments on commit 5fb2e85

Please sign in to comment.