mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Disable LiveReload when Hugo is not running as a server
This change fixes #1410.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user