shithub: hugo

Download patch

ref: be1287fba05fb87e80aaf3c277dd7c74408375e2
parent: be5fa2f3bd54b1d79cf078bb9c1d0af6e7715b26
author: bep <[email protected]>
date: Tue May 12 15:49:44 EDT 2015

Add data-no-instant to livereload script tag

To support instantclick.

Fixes #1135

--- a/transform/livereloadinject.go
+++ b/transform/livereloadinject.go
@@ -8,7 +8,7 @@
 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>`)