mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
b017f7cb01
Currently, Hugo does not inject `livereload` script if html does not contain `<head>` or `<body>`. This sometimes happens if you create new sites without `theme` and it is hard to catch the cause soon. This PR: * Inject livereload script even if html does not include `<head>`, `<body>`, or `<html>` - Modern browsers execute scripts even if they are outside `<html>` - Some js frameworks (confirmed with vite) inject HRM script without `<html>` tag * Append warning script to html if `<head>` or `<body>` is not in html * Fix bug that livereload cannot be appended to the tags with attrs Close #10105 |
||
---|---|---|
.. | ||
livereloadinject.go | ||
livereloadinject_test.go |