Skip to content

Commit

Permalink
fix for excluding generated pages, #58
Browse files Browse the repository at this point in the history
  • Loading branch information
timvink committed Oct 23, 2021
1 parent 080b568 commit 3be90d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions mkdocs_git_authors_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ def on_files(self, files, config, **kwargs):
return

for file in files:

# Exclude pages specified in config
excluded_pages = self.config.get("exclude", [])
if exclude(file.src_path, excluded_pages):
continue

path = file.abs_src_path
if path.endswith(".md"):
_ = self.repo().page(path)
Expand Down Expand Up @@ -130,7 +136,6 @@ def on_page_content(self, html, page, config, files, **kwargs):
# Exclude pages specified in config
excluded_pages = self.config.get("exclude", [])
if exclude(page.file.src_path, excluded_pages):
logging.debug("on_page_html, Excluding page " + page.file.src_path)
return html

list_pattern = re.compile(
Expand Down Expand Up @@ -169,7 +174,6 @@ def on_page_markdown(self, markdown, page, config, files, **kwargs):
# Exclude pages specified in config
excluded_pages = self.config.get("exclude", [])
if exclude(page.file.src_path, excluded_pages):
logging.debug("on_page_markdown, Excluding page " + page.file.src_path)
return markdown

pattern_authors_summary = re.compile(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="mkdocs-git-authors-plugin",
version="0.6",
version="0.6.1",
description="Mkdocs plugin to display git authors of a page",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 3be90d2

Please sign in to comment.