-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
if a file has no git logs, use the last modified timestamp instead of the current #111
Comments
Hi @eshaben , Thanks for reporting. Definitely something wrong here. The difference between last modified and creation date in commands is only very small: mkdocs-git-revision-date-localized-plugin/mkdocs_git_revision_date_localized_plugin/util.py Lines 122 to 124 in 6150fad
mkdocs-git-revision-date-localized-plugin/mkdocs_git_revision_date_localized_plugin/util.py Lines 132 to 134 in 6150fad
That translates to: git log --date=unix --format=%at -n=1 --diff-filter=A <filepath>
git log --date=unix --format=%at -n=1 <filepath> Could you have a look for one of the pages and run those two commands? I wonder if the first command return something empty or an error.. You're probably not the only one, so keen to figure this one out :) |
Thanks for the response! 🙂 Sure. This is one of the pages we're getting this error on: https://github.com/PureStake/moonbeam-docs/blob/master/builders/build/eth-api/dev-env/scaffold-eth.md When I run Then when I run |
@eshaben - Did you figure out your issue? I'm encountering the same thing, even though I do have git logs for the file in question. |
@karlgo I implemented a workaround. Created a script that checks if the created data is after the last updated date, and, if so, changes the created date to be the same as the last updated. For reference: https://github.com/moonbeam-foundation/moonbeam-docs/blob/master/js/fixCreatedDate.js |
I'm experiencing an interesting issue where I get the following error for a few of the pages of the documentation site I am working on:
Then when I view the pages it shows the last modified date correctly, but for the created date, it shows the current date. For example:
I think if there are no logs found for the created date, it should default to the last update date if available.
It'd also be nice to know the underlying reason why it can't find the git logs for when these pages were created, if you have any ideas?
The text was updated successfully, but these errors were encountered: