Currently you have to use (.OutputFormats.Get "json").Permalink)
from within your list.json
to output the json
version of the list page’s .Pages
- Maybe I am doing something wrong here. But if I just call
.Permalink
, it falls back the html version’s permalink. - I understand being on output format list template doesn’t mean you systematically need this output format’s permalink outputted, but I guess in most of the case you do.
Couldn’t Hugo uses the current template’s output format type when fetching any .Permalink
? Users would then have to use .OutputFormats.Get
only when accessing a different one.