File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/mkdocs_git_revision_date_localized_plugin Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,13 @@ def on_page_markdown(
271271 is_first_commit = True ,
272272 )
273273
274+ if first_revision_timestamp > last_revision_timestamp :
275+ # See also https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/issues/111
276+ msg = "First revision timestamp is older than last revision timestamp for page %s. " % page .file .src_path
277+ msg += "This can be due to a quick in `git` follow behaviour. You can try to set `enable_git_follow: false` in the plugin configuration."
278+ logging .warning (msg )
279+ first_revision_hash , first_revision_timestamp = last_revision_hash , last_revision_timestamp
280+
274281 # Creation date formats
275282 creation_dates = self .util .get_date_formats_for_timestamp (first_revision_timestamp , locale = locale , add_spans = True )
276283 creation_date = creation_dates [self .config ["type" ]]
You can’t perform that action at this time.
0 commit comments