hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 698019a5525a531ac1896c8205d8b7e63aba8e25
parent ef4dfcec6cf17308e2816ef29801f01c3cf6fcbb
Author: Kato Kazuyoshi <kato.kazuyoshi@gmail.com>
Date:   Wed, 14 Oct 2015 23:27:57 -0700

Disable LiveReload when Hugo is not running as a server

This change fixes #1410.

Diffstat:
Mhugolib/site.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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)
 	}