diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2015-10-14 23:27:57 -0700 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2015-10-15 16:36:14 -0400 |
commit | 698019a5525a531ac1896c8205d8b7e63aba8e25 (patch) | |
tree | 896722ecd0f94d4e4a2993b55785ad029f7a8af9 /hugolib | |
parent | ef4dfcec6cf17308e2816ef29801f01c3cf6fcbb (diff) |
Disable LiveReload when Hugo is not running as a server
This change fixes #1410.
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/site.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index 4cf31e4ab..743cc0826 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1449,7 +1449,7 @@ func (s *Site) renderAndWritePage(name string, dest string, d interface{}, layou transformLinks = append(transformLinks, transform.AbsURL) } - if viper.GetBool("watch") && !viper.GetBool("DisableLiveReload") { + if s.Running() && viper.GetBool("watch") && !viper.GetBool("DisableLiveReload") { transformLinks = append(transformLinks, transform.LiveReloadInject) } |