docs: Add note about live reload script injection

Answers common question in docs.
https://discuss.gohugo.io/t/livereload-only-works-on-the-homepage/1006/4
This commit is contained in:
David King 2016-05-25 20:20:22 +01:00 committed by digitalcraftsman
parent dcee05b2ae
commit c21b1558ae

View file

@ -45,9 +45,6 @@ This means that keeping the site open on a second monitor (or another
half of your current monitor) allows you to see exactly what your half of your current monitor) allows you to see exactly what your
content looks like without even leaving your text editor. content looks like without even leaving your text editor.
It's worth noting that "--watch" is enabled by default when "hugo server"
is run.
## Disabling LiveReload ## Disabling LiveReload
LiveReload works by injecting JavaScript into the pages it LiveReload works by injecting JavaScript into the pages it
@ -60,3 +57,9 @@ LiveReload functionality.
$ hugo server --watch --disableLiveReload $ hugo server --watch --disableLiveReload
## Notes
The `--watch` flag is enabled by default when `hugo server` is run.
You must have a closing `</body>` tag for LiveReload to work.
Hugo injects the LiveReload `<script>` before this tag.