jeffreytse / jekyll-deploy-action

🪂 A Github Action to deploy the Jekyll site conveniently for GitHub Pages.
MIT License
339 stars 44 forks source link

the jekyll-last-modified-at plugin doesn't work correctly #40

Closed wholon closed 2 years ago

wholon commented 2 years ago

The plugin jekyll-last-modified-at use git-log or file mtime to show last_modified_date_at date in pages which is pretty awesome.

But I found if I use this Action, all of the files git-log would become the last build time.

Is is possible to use jekyll-last-modified-at by this Action?

jeffreytse commented 2 years ago

Hi @wholon

Git doesn't record the last modification date, only the commit/author dates for an all commit, so when the GitHub action pull your repository, the modification date will be the same as the creation date, it's not the same as your local environment, but there is a way to do this, I will try to help settle your issue.

Thanks & Regards

wholon commented 2 years ago

Hi @wholon

Git doesn't record the last modification date, only the commit/author dates for an all commit, so when the GitHub action pull your repository, the modification date will be the same as the creation date, it's not the same as your local environment, but there is a way to do this, I will try to help settle your issue.

Thanks & Regards

Thank you~

jeffreytse commented 2 years ago

Hi @wholon

Now this feature has been added, please update your action to the latest version. In addition, the date time isn't as the same as it was, because it will restore the modification time (mtime) of all files in the work tree, based on the date of the most recent commit that modified the file.

Thanks & Regards

floating-cat commented 1 year ago

@jeffreytse Hi, the fix for this issue is incorrect. I tried this action but the generated date is still wrong for my blog. I have created a PR to fix this issue.