Skip to content

Commit e63bde8

Browse files
twsltimvink
authored andcommitted
Catch generated_by dynamic files
1 parent 43b39c9 commit e63bde8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mkdocs_git_authors_plugin/plugin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ def on_files(
123123
f"[git-authors-plugin] Unable to find path for file {file.src_path}. "
124124
"Generated, in-memory files won't have a git history."
125125
)
126+
elif hasattr(file, "generated_by") and file.generated_by:
127+
logger.debug(
128+
f"[git-authors-plugin] The file {file.src_path} was generated by {file.generated_by}. "
129+
"Generated, dynamic files won't have a git history."
130+
)
126131
elif path := file.abs_src_path:
127132
if path.endswith(".md"):
128133
_ = self.repo().page(path)

0 commit comments

Comments
 (0)