Sitemap using front matter not .Lastmod?


#1

The last mod dates in sitemap seem to be pulled from the front matter date, which is create date.

I’d prefer not to have to manually update front matter dates. What am I doing wrong?


#2

Your only auto option would be if you keep your content in a Git repository:


#3

Huh, interesting!

So … it seems that all I have to do is --enableGitInfo on the command line and now hugo will use Git’s author date instead of front matter. It seems odd that there isn’t a simple way to just pick up the file mtime directly, but I’ll take it. Thanks!


#4

We have had that discussion before, and there are many reasons for the mtime to be updated/reset – many of them not remotely connected to a “content edit”.