Page Kind in Hugo

Pages generated by Hugo each have a kind. This is a valuable reference, but isn’t documented on it’s own.

  • page
  • home
  • section
  • taxonomy
  • taxonomyTerm

Keeping kind in mind is useful for debugging template lookup order.

It is also used to configure output formats. For instance, I create an additional feed, and output it for the home page in my config:

[outputs]
home = [ "HTML", "RSS", "UPDATES" ]

I would use page if I wanted the updates feed to be scoped to and generated for regular pages, like blog posts.


This is a companion discussion topic for the original entry at https://interi.org/notes/page-kind-in-hugo/

I’ve seen .Kind used to both debug and conditionally load partials, so I should add examples of those.