mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Disable LiveReload when Hugo is not running as a server
This change fixes #1410.
This commit is contained in:
parent
ef4dfcec6c
commit
698019a552
1 changed files with 1 additions and 1 deletions
|
@ -1449,7 +1449,7 @@ func (s *Site) renderAndWritePage(name string, dest string, d interface{}, layou
|
||||||
transformLinks = append(transformLinks, transform.AbsURL)
|
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)
|
transformLinks = append(transformLinks, transform.LiveReloadInject)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue