summaryrefslogtreecommitdiffstats
path: root/hugolib/site.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index e77d48563..8948a1b29 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -864,6 +864,10 @@ func (s *Site) render(d interface{}, out string, layouts ...string) (err error)
transformLinks = append(transformLinks, absURL...)
}
+ if viper.GetBool("watch") && !viper.GetBool("DisableLiveReload") {
+ transformLinks = append(transformLinks, transform.LiveReloadInject)
+ }
+
transformer := transform.NewChain(transformLinks...)
var renderBuffer *bytes.Buffer