Hi,
I’m stuck at getting dates to render in the YYYY-MM-DD form. Ideally, I would like to do this globally in config.toml
and avoid setting it in templates. Using the magic 2006-01-02 fails.
I’ve tried variations on
[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = [":git", "lastmod", "date", "publishDate"]0
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]
all of which yield dates in the form Aug 5, 2020
. I’m unsure how and where to use
[frontmatter]
date = ["myDate", ":default"]
Yihui Xie, avoided the issue in his adaptation of the Hugo-Lithium theme for his R:blogdown
package by using markup in his templates:
… span class=“article-date”>{{ .Date.Format “2006-01-02” }} …
in single.html and
{{ .Date.Format “2006-01-02” }}
in list.html.
Is what I’m attempting possible? Pointers gratefully received.