diff --git a/mkdocs_blogging_plugin/util.py b/mkdocs_blogging_plugin/util.py index 483f81f..af449d9 100644 --- a/mkdocs_blogging_plugin/util.py +++ b/mkdocs_blogging_plugin/util.py @@ -92,7 +92,7 @@ def get_git_commit_timestamp( if is_first_commit: # diff_filter="A" will select the commit that created the file commit_timestamp = git.log( - realpath, date="short", format="%at", diff_filter="A" + realpath, date="short", format="%at", diff_filter="A", follow=True ) # A file can be created multiple times, through a file renamed. # Commits are ordered with most recent commit first @@ -101,7 +101,7 @@ def get_git_commit_timestamp( commit_timestamp = commit_timestamp.split()[-1] else: commit_timestamp = git.log( - realpath, date="short", format="%at", n=1 + realpath, date="short", format="%at", n=1, follow=True ) except (InvalidGitRepositoryError, NoSuchPathError) as err: logger.warning( diff --git a/setup.py b/setup.py index 90ae6fa..f601676 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="mkdocs-blogging-plugin", - version="2.2.1", + version="2.2.2", description="Mkdocs plugin that generates a blog index page sorted by creation date.", long_description=LONG_DESCRIPTION, long_description_content_type="text/markdown",