aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-07-22 13:22:04 +0200
committerBjørn Erik Pedersen <[email protected]>2019-07-22 13:54:24 +0200
commit2fc0abd22a37d90b6f1032eef46191a7bddf41bd (patch)
tree0599b50676d0daacb55204711a6c5431bdf0b883 /transform
parent53da3881debbd5e2e325372d3d1ddd37bc9dc602 (diff)
downloadhugo-2fc0abd22a37d90b6f1032eef46191a7bddf41bd.tar.gz
hugo-2fc0abd22a37d90b6f1032eef46191a7bddf41bd.zip
Fix livereload for @import case
Fixes #6106
Diffstat (limited to 'transform')
-rw-r--r--transform/livereloadinject/livereloadinject.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/transform/livereloadinject/livereloadinject.go b/transform/livereloadinject/livereloadinject.go
index e04b977f7..bee40f25c 100644
--- a/transform/livereloadinject/livereloadinject.go
+++ b/transform/livereloadinject/livereloadinject.go
@@ -28,7 +28,7 @@ func New(port int) transform.Transformer {
b := ft.From().Bytes()
endBodyTag := "</body>"
match := []byte(endBodyTag)
- replaceTemplate := `<script data-no-instant>document.write('<script src="/livereload.js?port=%d&mindelay=10"></' + 'script>')</script>%s`
+ replaceTemplate := `<script data-no-instant>document.write('<script src="/livereload.js?port=%d&mindelay=10&v=2"></' + 'script>')</script>%s`
replace := []byte(fmt.Sprintf(replaceTemplate, port, endBodyTag))
newcontent := bytes.Replace(b, match, replace, 1)