_index.md
+ HTML file w/o front matter causes hugo serve
to hang during re-render #7028
Description
What version of Hugo are you using (hugo version
)?
$ hugo version Hugo Static Site Generator v0.66.0/extended darwin/amd64 BuildDate: unknown
Does this issue reproduce with the latest release?
Yes
Steps to reproduce:
Note that I haven't found a minimal repro and the site that I know reproduces this is private.
If it's not easy to diagnose the error from the stack traces I've attached below, I'm happy to try to minimize the reproduction, but I suspect it's something about my custom theme and am not looking forward to trying to minimize it--so I'm posting here first in case the stack traces make it obvious.
Steps:
- Use the following content hierarchy:
# content/posts/drafts/_index.md
---
cascade:
draft: true
---
# content/posts/drafts/conviction.md
---
title: ...
---
...
hugo serve --buildDrafts
- Navigate to
/conviction/
, the URL of a draft post - Edit the draft post by inserting a paragraph containing "asdf" at the beginning
- Observe that the browser does not auto-reload
- Observe that the server never the log line
Source changed "/Users/ben/code/benkuhn.net/content/posts/drafts/conviction.md": WRITE
, but not the next expected lineTotal in <X> ms
- Try to navigate to another page (that hasn't been rendered yet)
- Observe an infinite loading spinner
The problem does not reproduce if I remove the drafts/_index.md
file and add draft: true
to conviction.md
. It also does not reproduce when I edit a non-draft. It does reproduce with --disableFastRender
or --disableLiveReload
.
I ran the first step with GOTRACEBACK=all
and sent SIGQUIT to the server while it was hung; it produced the following stacktraces:
I also ran it with --trace
and it produced the following file (gzipped so github will let me upload):
hugo-trace.gz
As I mentioned, I couldn't reproduce this with a blank site, so there must be some other part of my config that's interacting with the cascade: {draft: true}
setting. Please let me know if you have ideas for what that could be, as it'll help me create a minimal repro.