timvink / mkdocs-git-revision-date-localized-plugin

MkDocs plugin to add a last updated date to your site pages
https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/index.html
MIT License
206 stars 44 forks source link

Add build_date #28

Closed timvink closed 4 years ago

timvink commented 4 years ago

Current behaviour is that if git is not available (due to new projects, or shallow clones in CI), there is an error advising to enable fallback_to_build_date.

Build date and revision date are actually two separate things. The correct behaviour for revision_date should be to throw an error, and then optionally silence it with parameters. (as discussed in https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/pull/26)

Additionally a new build_date tag can be made available, where is it advised to also silence git errors.

timvink commented 4 years ago

Change of insight here. While not a super clean solution, fallback_to_build_date works.

The build_date should be a tag supplied by https://github.com/timvink/mkdocs-git-authors-plugin, where I plan to make available many different git-related tags.