mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 20:14:58 +00:00
Disable LiveReload when Hugo is not running as a server
This change fixes #1410.
This commit is contained in:
1 parent
ef4dfcec6c
commit
698019a552
1 file changed
+1
-1
+1
-1
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user