-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I can't build mkdocs sites from repositories where commits are signed and git client is configured to always show commit signature.
The problem seems to be here:
mkdocs-rss-plugin/mkdocs_rss_plugin/util.py
Lines 145 to 159 in c9b1c8b
| if not dt_created: | |
| dt_created = self.repo.log( | |
| in_page.file.abs_src_path, | |
| n=1, | |
| date="short", | |
| format="%at", | |
| diff_filter="AR", | |
| ) | |
| if not dt_updated: | |
| dt_updated = self.repo.log( | |
| in_page.file.abs_src_path, | |
| n=1, | |
| date="short", | |
| format="%at", | |
| ) |
It assumes that git log -1 --date=short --format="%at"'s output will only contain the timestamp and nothing else, which isn't true.
My gitconfig contains:
[log]
showSignature = trueWhich is equivalent to git log --show-signature ..., and the output will always contain commit signature info:
$ git log --date=short -1 --format="%at"
gpg: Signature made Tue Jun 21 17:19:48 2022 PDT
gpg: using EDDSA key 90DA57F75A16D8729DBEE227CD67D78AC53D68C5
gpg: Good signature from "Yuhao Zhang <[email protected]>" [ultimate]
1655857188And the plugin will crash at:
mkdocs-rss-plugin/mkdocs_rss_plugin/util.py
Lines 179 to 180 in c9b1c8b
| int(dt_created), | |
| int(dt_updated), |
Because the whole string cannot be converted to int.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request