This morning's random perusal of the Hugo documentation turned up a fix for the .Lastmod
page variable defaulting to the .Date
page variable value 100% of the time. Once again, the solution involves grabbing the reigns of your Hugo configuration using the config/_default/
directory. Create a template at config/_default/frontmatter.toml
.
Plop this line in as its content: lastmod = ['lastmod', ':fileModTime', ':default']
. Just like that, you have yourself some accurate .PublishDate
and .Lastmod
values.