mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Add data-no-instant to livereload script tag
To support instantclick. Fixes #1135
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
|||||||
func LiveReloadInject(ct contentTransformer) {
|
func LiveReloadInject(ct contentTransformer) {
|
||||||
match := []byte("</body>")
|
match := []byte("</body>")
|
||||||
port := viper.GetString("port")
|
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]
|
+ (location.host || 'localhost').split(':')[0]
|
||||||
+ ':` + port + `/livereload.js?mindelay=10"></'
|
+ ':` + port + `/livereload.js?mindelay=10"></'
|
||||||
+ 'script>')</script></body>`)
|
+ 'script>')</script></body>`)
|
||||||
|
Reference in New Issue
Block a user