Skip to content
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

server: Newly created files are not rendered on refresh #12054

Closed
TiGR opened this issue Feb 17, 2024 · 3 comments · Fixed by #12057
Closed

server: Newly created files are not rendered on refresh #12054

TiGR opened this issue Feb 17, 2024 · 3 comments · Fixed by #12057

Comments

@TiGR
Copy link

TiGR commented Feb 17, 2024

When you start server, and then create a page, it won't appear in rendered pages list. Hugo notices the change, runs rebuild, but the lists stay the same. If you restart hugo, new page appears in the list.

Also, in some more complicated scenarios, new pages do appear in the lists, but they have empty content (empty title, empty content), even though it is not empty.

@jmooring jmooring changed the title server: Newly created files are not rendered on refresh in 0.123 server: Newly created files are not rendered on refresh Feb 17, 2024
@bep bep added this to the v0.123.0 milestone Feb 17, 2024
@bep
Copy link
Member

bep commented Feb 17, 2024

I have tested this without any issues (took it for a spin now), so you need to be more specific.

@TiGR
Copy link
Author

TiGR commented Feb 18, 2024

Okay, take this example site.

  1. Run hugo server
  2. Open the server in browser, you'll see a list of pages, there is only one page, Test Page.
  3. Make a new page (for instance, create a file content/test-page-2/index.md), fill it with some test content
  4. Notice hugo runs rerender
  5. Check the browser, see the list still showing only one page
  6. Restart hugo
  7. Check the browser and see that there is that new page in the list.

In hugo 0.122 everything works as expected.

bep added a commit to bep/hugo that referenced this issue Feb 18, 2024
The partial rebuilds works by calaulating a baseline from a change set.

For new content, this doesn't work, so to avoid rebuilding everything, we first
try to collect a sample of surrounding identities (e.g. content files in the same section).

This commit fixes a flaw in that logic that in some cases would return a too small sample set.

Fixes gohugoio#12054
bep added a commit to bep/hugo that referenced this issue Feb 18, 2024
The partial rebuilds works by calaulating a baseline from a change set.

For new content, this doesn't work, so to avoid rebuilding everything, we first
try to collect a sample of surrounding identities (e.g. content files in the same section).

This commit fixes a flaw in that logic that in some (many...) cases would return a too small sample set.

Fixes gohugoio#12054
bep added a commit that referenced this issue Feb 18, 2024
The partial rebuilds works by calaulating a baseline from a change set.

For new content, this doesn't work, so to avoid rebuilding everything, we first
try to collect a sample of surrounding identities (e.g. content files in the same section).

This commit fixes a flaw in that logic that in some (many...) cases would return a too small sample set.

Fixes #12054
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants