mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
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:
parent
dcee05b2ae
commit
c21b1558ae
1 changed files with 6 additions and 3 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue