-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Completely skip pages excluded by match_path #49
Conversation
Codecov Report
@@ Coverage Diff @@
## master #49 +/- ##
==========================================
- Coverage 37.66% 37.45% -0.21%
==========================================
Files 5 5
Lines 300 299 -1
Branches 57 57
==========================================
- Hits 113 112 -1
Misses 182 182
Partials 5 5
|
Thanks @pauloribeiro-codacy for taking time to contribute. I'll try to make a review in the next days. |
(I inadvertently closed the pull request when I mentioned it in codacy/docs#567. 😅 ) In the meantime, I'm testing this fix on the site that I'm maintaining: |
It's working for me. @pauloribeiro-codacy with this behavior, is it possible to match multiple folders? for example with your website, include release-notes and articles. |
@Guts yes, since - rss:
match_path: "(release-notes|articles)/.*" |
Ok thanks. I will add it for reference in the documentation. |
The updated version includes the fix from Guts/mkdocs-rss-plugin#49
The updated version includes the fix from Guts/mkdocs-rss-plugin#49
I was experimenting @rmorshea's great contribution on #43 to include only a small subset of relevant pages in the feeds for my site, hoping that it would be an elegant way to overcome the limitation in #23. However, I noticed the following:
match_path
match_path
would show up on the outputThis was because the
match_path
filter was only being applied during theon_post_build
event handler, and after the list of pages to include in the output had already been truncated by the configurationlength
.To fix this issue I propose that we completely skip processing the pages that aren't included in
match_path
, with the additional advantages:match_path
is less scattered, and could facilitate subsequent work on Add ability to include/exclude files using regex pattern #45.