-
DescriptionI am using github actions to publish my website.
In
but all my pages have today's date. I suspect that the last modified date is coming from the date the date when github CI clones the repo (and hence today's date) rather than when the file was checked into the repo (which is the true last-modified date). Is it possible to somehow use the date when the file was last committed to git, for example, similar to what is available for hugo |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
If you don't want this, use |
Beta Was this translation helpful? Give feedback.
-
Thanks. I could not get After a bit of googling, I found this script: Adding that as a github action does exactly what I want: it changes the mtime of all files to be the same as the last time that file was added to git. |
Beta Was this translation helpful? Give feedback.
Thanks.
I could not get
freeze:auto
to work with github actions. I do not want to freeze the rendering ... freezing rendering could lead to stale links in cross refs (if the frozen page was referring to theorems/equations in other chapters).After a bit of googling, I found this script:
https://stackoverflow.com/questions/21735435/git-clone-changes-file-modification-time/55609950#55609950
Adding that as a github action does exactly what I want: it changes the mtime of all files to be the same as the last time that file was added to git.