Custom output format for taxonomy terms

I’m trying to get a taxonomy term to output a JSON version, but not having much success. My guess is that I’m missing something simple but I’m not sure what… I’ve tried adding

[outputs]
    taxonomyTerm = [ "HTML", "JSON" ]

to my config.toml right next to similar entries for page, section, home, and taxonomy, and I’ve created a layout with an *.json extension right next to the *.html version. AFAICT the documentation seems to indicate this should work Hugo doesn’t pick it up. Running hugo -v doesn’t complain about the template being missing, either…

If I add the output formats to my front matter instead, with something like

---
title: Whatever
outputs:
- html
- json
---

hugo -v will complain about not being able to find the relevant template, even though it’s there right next to the HTML version, with the *.html version replaced with *.json.

Anyone have any ideas about what could be wrong? If it helps, the code is at https://github.com/factopolis/factopolis/tree/wip/split-claims and the first template I’m trying to get working is in themes/factopolis/layouts/taxonomy/claim.terms.json.

So is it safe to assume this is a bug? Does anyone have an example of a template for a custom output format with a taxonomyTerm actually working?

I looked through this to tried and replicate on a site of mine and had no luck generating a term-based JSON file. If I can I’ll go through again later. Not 100% sure it’s a bug, but something’s wrong.

I filed https://github.com/gohugoio/hugo/issues/3831 about this a little while ago.