Skip to content

Commit

Permalink
Disable LiveReload when Hugo is not running as a server
Browse files Browse the repository at this point in the history
This change fixes gohugoio#1410.
  • Loading branch information
kzys authored and spf13 committed Oct 15, 2015
1 parent ef4dfce commit 698019a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 698019a

Please sign in to comment.