-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
What version of Hugo are you using (hugo version
)?
hugo v0.123.8-5fed9c591b694f314e5939548e11cc3dcb79a79c windows/amd64 BuildDate=2024-03-07T13:14:42Z VendorInfo=gohugoio
Microsoft Windows [Version 10.0.19045.4046]
Does this issue reproduce with the latest release?
Yes.
Issue does not appear to be present in hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e windows/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=gohugoio
which is the previous build I had been using until recently.
Description
While running hugo server
, changes made to the content of newly created sub-sections will not be reflected in the browser after they are initially created. Restarting hugo reflects the updated content, and future changes are reflected correctly in any sub-sections which existed prior to hugo being launched.
Since I'm currently working on a site structured as a hierarchical directory, I'm running into this a lot, requiring a restart of hugo server
each time I add a new sub-section.
Steps to reproduce
Create new site and theme
hugo new site test-site
cd test-site
hugo new theme test-theme
Edit hugo.toml
to add theme = 'test-theme'
.
Launch hugo server
hugo server -D
The -D
is not required, but useful as the default archetype is set to draft, so this simplifies the test. Alternatively, edit archetypes/default.md
to remove draft = true
.
In another terminal, create a top level section
hugo new content/top-section/_index.md
Navigate to http://localhost:1313/top-section/
in your browser and observe the section has been created.
Make a noticeable change to the content of content/top-section/_index.md
and save the file. Note the change is reflected in the browser.
Create a sub-section
hugo new content/top-section/sub-section/_index.md
The new section is reflected in the browser. Navigate to the new section.
Make a noticeable change to the content of content/top-section/sub-section/_index.md
and save the file.
Unlike the change made to the top level section, changes made to the sub-section are not reflected in browser, either automatically, or by manually forcing a page refresh. Additional changes made to the file will also not be reflected.
Also note that the change to the sub section content is also not reflected in the sub-section summary when viewing the top level section.
Terminate and re-launch hugo.
hugo server -D
Note that the updated content of sub-section is reflected in the browser as expected.
Make a noticeable change to the content of content/top-section/sub-section/_index.md
.
This and all further changes to the existing sub-section should now be reflected in the browser.