Skip to content

Commit c21b155

Browse files
oodaviddigitalcraftsman
authored andcommitted
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
1 parent dcee05b commit c21b155

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/content/extras/livereload.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ This means that keeping the site open on a second monitor (or another
4545
half of your current monitor) allows you to see exactly what your
4646
content looks like without even leaving your text editor.
4747

48-
It's worth noting that "--watch" is enabled by default when "hugo server"
49-
is run.
50-
5148
## Disabling LiveReload
5249

5350
LiveReload works by injecting JavaScript into the pages it
@@ -60,3 +57,9 @@ LiveReload functionality.
6057

6158
$ hugo server --watch --disableLiveReload
6259

60+
## Notes
61+
62+
The `--watch` flag is enabled by default when `hugo server` is run.
63+
64+
You must have a closing `</body>` tag for LiveReload to work.
65+
Hugo injects the LiveReload `<script>` before this tag.

0 commit comments

Comments
 (0)