]> git.maquefel.me Git - brevno-suite/hugo/commit
transform/livereloadinject: Skip livereload.js injection if no tags found (note)
authorAndrii Chubatiuk <andrew.chubatiuk@gmail.com>
Sat, 13 Sep 2025 16:36:39 +0000 (19:36 +0300)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 2 Oct 2025 11:39:35 +0000 (13:39 +0200)
commit7fd6762c1657842de4404c5b2621154bf3b27218
treed6fe95c77380774ba1b4d847e7c9470f44c4b58a
parent584f052f397a7ff8aebe8fbac9564e847eeba6cc
transform/livereloadinject: Skip livereload.js injection if no tags found (note)

This change is mainly motivated to support sites built by HTML fragments with e.g. a JS framework.

Now we don't inject the script if we don't find any of `doctype` (the only one required by the HTML 5 spec), `html` or `head`.

Co-authored-by: bep <bjorn.erik.pedersen@gmail.com>
testscripts/commands/server.txt
transform/livereloadinject/livereloadinject.go
transform/livereloadinject/livereloadinject_test.go