Hi. I’ve been running into problems with using GitInfo for .LastMod
. I’ve enabled enableGitInfo = true
in one of my projects. Locally, when using hugo server
, my front page looks correct, so all pages have their appropriate .LastMod according to the latest git commit of their markdown file, e.g.:
First post: posted 12/22 - updated 12/24
Second post: posted 12/16 - updated 12/17
Third post: posted 12/14 - updated 12/17
When pushing it to my GitHub which deploys the website to gh-pages using GitHub Actions, the .LastMod for all pages results in the deployment datetime, e.g. for today 12/25:
First post: posted 12/22 - updated 12/25
Second post: posted 12/16 - updated 12/25
Third post: posted 12/14 - updated 12/25
I tried it using the --enableGitInfo
flag instead of the config.toml option but the results are the same. --debug
does not show anything related. Any ideas why the .Lastmod is wrong inside the CI?