Skip to content

Commit

Permalink
Catch generated_by dynamic files
Browse files Browse the repository at this point in the history
  • Loading branch information
twsl authored and timvink committed Oct 25, 2024
1 parent 43b39c9 commit e63bde8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mkdocs_git_authors_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def on_files(
f"[git-authors-plugin] Unable to find path for file {file.src_path}. "
"Generated, in-memory files won't have a git history."
)
elif hasattr(file, "generated_by") and file.generated_by:
logger.debug(
f"[git-authors-plugin] The file {file.src_path} was generated by {file.generated_by}. "
"Generated, dynamic files won't have a git history."
)
elif path := file.abs_src_path:
if path.endswith(".md"):
_ = self.repo().page(path)
Expand Down

0 comments on commit e63bde8

Please sign in to comment.