Each of my posts uses {{ .Date.Format "January 2, 2006" }} to produce “Published” and {{ .Lastmod.Format "January 2, 2006" }} to produce (if applicable) “Last modified” info at the top of the page. Starting with Hugo 0.55.0 and continuing with 0.55.1, that works fine on my local Hugo install for a regular post but the same code on my site’s “About me” page outputs "0001-01-01 00:00:00 +0000 UTC" for both parameters. Even odder: putting a bogus .md file in the /content/about/ directory solved this problem on-screen yet the output for the date and lastmod was coming from that file's front matter, not from the /content/about/_index.md file, although the remainder of the correct file's content was shown as usual.
Public repo for examination:
https://github.com/brycewray/hugo_site_css-grid
Related thread in the Hugo forums:
https://discourse.gohugo.io/t/hugo-0-55-0-date-appears-as-january-1-0001/18029
Page working normally under, still, 0.54.0:
https://brycewray.com/about/
(My first-ever GitHub bug report; I apologize in advance if I missed anything or, on the other hand, gave too much info.)
A bug, alright. For sections, it looks for the date in the sections' pages, even if the date is set in front matter.
Is this issue fixed?
Most helpful comment
A bug, alright. For sections, it looks for the date in the sections' pages, even if the date is set in front matter.