I’m having an issue using .Lastmod as part of my Pages. The docs on the .Lastmod Variable specify that:
If
lastmodis not set, and.GitInfofeature is enabled,.GitInfo.AuthorDatewill be used instead.
This seems to imply that I can specify lastmod in the frontmatter and that value will be preferred over .GitInfo.AuthorDate, but what I’m experiencing is that .GitInfo.AuthorDate is being used regardless of whether lastmod is set or not.
Printing out the 3 variables demonstrates this:
{{ printf "Lastmod: %#v" .Lastmod }}
{{ printf "Params.lastmod: %#v" .Params.lastmod }}
{{ printf "GitInfo.AuthorDate: %#v" .GitInfo.AuthorDate }}
Lastmod: time.Time{wall:0x0, ext:63657100087, loc:(*time.Location)(0x20ac180)}
Params.lastmod: time.Time{wall:0x0, ext:63656323200, loc:(*time.Location)(nil)}
GitInfo.AuthorDate: time.Time{wall:0x0, ext:63657100087, loc:(*time.Location)(0x20ac180)}
Am I misunderstanding the docs, or is this a bug?