Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wholon opened this issue Apr 20, 2022 · 4 comments
Closed

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

wholon opened this issue Apr 20, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@wholon
Copy link

wholon commented Apr 20, 2022

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 jeffreytse self-assigned this Apr 20, 2022
@jeffreytse jeffreytse added the good first issue Good for newcomers label Apr 20, 2022
@jeffreytse
Copy link
Owner

jeffreytse commented Apr 20, 2022

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
Copy link
Author

wholon commented Apr 28, 2022

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 added a commit that referenced this issue May 8, 2022
Restore the modification time (mtime) of all files in work tree, based
on the date of the most recent commit that modified the file.
@jeffreytse jeffreytse added the enhancement New feature or request label May 8, 2022
@jeffreytse
Copy link
Owner

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
Copy link
Contributor

floating-cat commented Nov 19, 2022

@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.

jeffreytse pushed a commit that referenced this issue Nov 22, 2022
* Revert "feat: support to restore mtime of all files (#40)"

This reverts commit d51e3c7.

* Advise a way to make the action work for jekyll-last-modified-at plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants