Skip to content

Commit 3be90d2

Browse files
committed
fix for excluding generated pages, #58
1 parent 080b568 commit 3be90d2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

mkdocs_git_authors_plugin/plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ def on_files(self, files, config, **kwargs):
9797
return
9898

9999
for file in files:
100+
101+
# Exclude pages specified in config
102+
excluded_pages = self.config.get("exclude", [])
103+
if exclude(file.src_path, excluded_pages):
104+
continue
105+
100106
path = file.abs_src_path
101107
if path.endswith(".md"):
102108
_ = self.repo().page(path)
@@ -130,7 +136,6 @@ def on_page_content(self, html, page, config, files, **kwargs):
130136
# Exclude pages specified in config
131137
excluded_pages = self.config.get("exclude", [])
132138
if exclude(page.file.src_path, excluded_pages):
133-
logging.debug("on_page_html, Excluding page " + page.file.src_path)
134139
return html
135140

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

175179
pattern_authors_summary = re.compile(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="mkdocs-git-authors-plugin",
8-
version="0.6",
8+
version="0.6.1",
99
description="Mkdocs plugin to display git authors of a page",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)