404.html reports .IsNode as true

I was hunting down a bug in my theme which was caused by .IsNode being true for the 404.html template.

The documentation of .IsNode doesn’t say anything about these special page kinds.

So I’m wondering: Is this a bug or is this actually working as intended?

My interpretation of .IsNode always was that it’s a list of pages - which doesn’t seem to apply to 404.html.

This behavior is nothing new… it existed in v0.54.0 (I didn’t test anything earlier).

{{ .Kind }}       --> 404 (correct)
{{ .Type }}       --> page (correct, I think)

{{ .IsHome }}     --> false (correct)
{{ .IsSection }}  --> false (correct)

{{ .IsNode }}     --> true (incorrect)
{{ .IsPage }}     --> false (incorrect based on .Kind above, maybe)

The .IsNode value seems like a bug to me.

I’m not sure about .IsPage.

Please create a GitHub issue, and cross-reference this topic. Thanks.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.