mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Add data-no-instant to livereload script tag
To support instantclick. Fixes #1135
This commit is contained in:
parent
be5fa2f3bd
commit
be1287fba0
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import (
|
|||
func LiveReloadInject(ct contentTransformer) {
|
||||
match := []byte("</body>")
|
||||
port := viper.GetString("port")
|
||||
replace := []byte(`<script>document.write('<script src="http://'
|
||||
replace := []byte(`<script data-no-instant>document.write('<script src="http://'
|
||||
+ (location.host || 'localhost').split(':')[0]
|
||||
+ ':` + port + `/livereload.js?mindelay=10"></'
|
||||
+ 'script>')</script></body>`)
|
||||
|
|
Loading…
Reference in a new issue