I’m using Hugo to build static pages for a django site.
To populate the meta description tag, I’ve added a custom “description” type which outputs a txt file. In config.toml
I’ve added:
[outputFormats]
[outputFormats.description]
baseName = "description"
isHTML = true
path = 'meta/description'
mediaType = "text/plain"
[outputs]
page = ["HTML", "description"]
Then in my layout/_default/
folder I’ve added two extra templates, to correspond to the existing list.html
and single.html
:
list.txt
and single.txt
, both of which contain:
{{.Description | safeHTML }}
The files from single.txt
are created as expected, however the list.txt
pages don’t seem to work.
The last time this topic was raised, this github issue was linked to:
However, as far as I can see from reading it, it doesn’t have anything to do with custom templates.