Terms using taxonomy templates for html since 0.146

Since 0.146, terms with default html output format are using the taxonomy.html template.

If used with a self-defined, html-based output format, the correct term template is used.

See the last two links of the sample page:

  • tags/one/index.html
  • tags/one/index.print.html

See

git clone --single-branch -b hugo-forum-topic-54317 https://github.com/McShelby/hugo-testing hugo-forum-topic-54317
cd hugo-forum-topic-54317
hugo server

Yes, that’s a breaking change. Get rid of the _default directory.

Adding output format to increase specificity will also work:

layouts/
└── _default/
    ├── baseof.html
    ├── home.html
    ├── list.html
    ├── single.html
    ├── taxonomy.html.html
    └── term.html.html

But I’d move to the new structure instead:

layouts/
├── baseof.html
├── home.html
├── list.html
├── single.html
├── taxonomy.html
└── term.html

I read the comments to that change in the GitHub issue tracker but it was pretty difficult to follow (at least for me it was).

Could you give some more detailed explanation about what’s happening in my case and why it behaves different when moving those files?

May be fixed with the upcoming version.

It is not.

While not ideal, my advice to theme authors is to forget about backwards compatibility. Either set the maximum version to 0.145.0 and leave things alone, or set the minimum version to 0.146.x and make the necessary changes.

I understand that this:

  1. Won’t help those who have already installed the theme.
  2. Will generate some noise.
  3. Will require site authors to make similar changes if they have overridden any templates.