diff --git a/src/mkdocs_git_revision_date_localized_plugin/plugin.py b/src/mkdocs_git_revision_date_localized_plugin/plugin.py index f0bc549..f3c180a 100644 --- a/src/mkdocs_git_revision_date_localized_plugin/plugin.py +++ b/src/mkdocs_git_revision_date_localized_plugin/plugin.py @@ -271,6 +271,13 @@ def on_page_markdown( is_first_commit=True, ) + if first_revision_timestamp > last_revision_timestamp: + # See also https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/issues/111 + msg = "First revision timestamp is older than last revision timestamp for page %s. " % page.file.src_path + 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." + logging.warning(msg) + first_revision_hash, first_revision_timestamp = last_revision_hash, last_revision_timestamp + # Creation date formats creation_dates = self.util.get_date_formats_for_timestamp(first_revision_timestamp, locale=locale, add_spans=True) creation_date = creation_dates[self.config["type"]]