This seems like a straightforward template rendering order problem but I can’t figure out the issue. I’ve got it working, but I can’t figure out WHY it works… I’m working on a new theme & my /layouts/_default/baseof.html template contains two blocks
{{ block "hero" . }}{{ end }}
{{ block "main" . }}{{ end }}
At this time, the hero block is defined in just one place: /layouts/blog/list.html. My intention is to use this hero block for the top portion of the current section’s index page.
What I’m observing:
When I have nothing in the hero block /layouts/_default/baseof.html template, the hero block defined in the blog post list template is rendered on the homepage on the site (defined with it’s own template, /layouts/home.html): ie: http://localhost:1313/
When I put anything other than whitespace in the default hero block in /layouts/_default/baseof.html (such as an empty HTML comment <!-- -->, it won’t add the hero from the blog list template.
Why is that? How could the block defined in the blog section show up on the homepage?
I say this because I had a similar sense of confusion a few days ago. 0.74.0 broke the Hugo Docs site related to this. I added a fix an hour later in 0.74.1 that should get it back to 0.73.0 behaviour in this department, see