Open skrysmanski opened 7 months ago
I think the primary question here is: What does .IsNode
actually mean.
The documentation simply states:
Reports whether the given page is a node.
What exactly makes a page a node? (Or: What exactly is a node, semantically?) Is this documented somewhere?
My interpretation is that a "node page" is a collection of pages. But this would not apply to the 404, or would it?
{{ .Kind }} --> 404 (correct)
{{ .Type }} --> page (correct)
{{ .IsHome }} --> false (correct)
{{ .IsSection }} --> false (correct)
{{ .IsNode }} --> true (??)
{{ .IsPage }} --> false (??)
I learned yesterday that the 404 template receives a Pages
collection in context (seems to be equivalent to Site.Pages
), and you can paginate within this template. So in that sense it is a "node". Having said that, I don't know why it receives pages in context, and the ability to paginate within this template is new in v0.123.0 (which lead to https://github.com/gohugoio/hugo/issues/12192).
As discussed here,
.IsNode
should befalse
for the404.html
template.What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes