-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: Server does not refresh sub-section content if the section was created after launch #12230
Comments
@jmooring assuming you tested this, what OS did you run it on? I have ran through the above recipe a few times, but it seem to work fine with me on MacOS. |
Tested on Windows, will retest. |
I can consistently reproduce this on Windows 11 with hugo v0.124.0-DEV-9ca1de09 |
This commit also optimizes for the case where change events for both file (e.g. `_index.md`) and the container directory comes in the same event batch. While testing this on Windows 11 (ARM64), I notice that Windows behaves a little oddly when dumping a folder of files into the content tree; it works (at least after this commit), but it seems like the event batching behaves differently compared to other OSes (even older Win versions). A related tip would be to try starting the server with polling, to see if that improves the situation, e.g.: ``` hugo server --poll 700ms ``` Fixes gohugoio#12230
This commit also optimizes for the case where change events for both file (e.g. `_index.md`) and the container directory comes in the same event batch. While testing this on Windows 11 (ARM64), I notice that Windows behaves a little oddly when dumping a folder of files into the content tree; it works (at least after this commit), but it seems like the event batching behaves differently compared to other OSes (even older Win versions). A related tip would be to try starting the server with polling, to see if that improves the situation, e.g.: ``` hugo server --poll 700ms ``` Fixes #12230
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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
Edit
hugo.toml
to addtheme = 'test-theme'
.Launch
hugo server
The
-D
is not required, but useful as the default archetype is set to draft, so this simplifies the test. Alternatively, editarchetypes/default.md
to removedraft = true
.In another terminal, create a top level section
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
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.
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.
The text was updated successfully, but these errors were encountered: