Documentation update needed

As hinted in another thread, a v2 of the template system is upon us, but the documentation doesn’t seem to reflect it.

In my setup, I started seeing found no layout file for "html" for kind "term" despite layouts/taxonomy/list.html being present (this file should be picked by the lookup for term, according to the documentation).

It looks like an update to the documentation page with clear indications as to what is expected to work in v2 (and what may work on the “best effort” basis) would be extremely welcome.

You’re right it probably should be updated.

The new files Hugo looks for is “term.html” and “terms.html”. I have both of mine nested in layouts/_default and it seems to find them.

You could also consider waiting with the upgrade until the documentation is ready.

As to term template, the common pattern going forward is to put a template with name [pagekind].html directly inside /layouts where pagekind is one of home, page, term or taxonomy.

So /layouts/term.html should work for you.

  • If you want to have more specific control you can put the template closer to the page/section/taxonomy e.g. /layouts/tags/blue/list.html
  • If you want to have less specific control, use the single/list/all layouts, e.g. layouts/all.html will work as a fallback template for all HTML rendering.

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