mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
53da3881de
commit
2fc0abd22a
2 changed files with 3 additions and 5 deletions
File diff suppressed because one or more lines are too long
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue