Skip to content

Commit

Permalink
Make match_path OS agnostic
Browse files Browse the repository at this point in the history
`page.file.src_path` on Windows contains backslashes resulting in an empty RSS feed if `match_path` contains a forward slash. This commit replaces `src_path` with `src_uri` which provides an OS independent path with forward slashes '/'.

Signed-off-by: Mikhail Velikikh <mvelikikh@gmail.com>
  • Loading branch information
mvelikikh authored Sep 5, 2024
1 parent a168516 commit 020d441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdocs_rss_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def on_page_content(
return

# skip pages that don't match the config var match_path
if not self.match_path_pattern.match(page.file.src_path):
if not self.match_path_pattern.match(page.file.src_uri):
return

# skip pages with draft=true
Expand Down

0 comments on commit 020d441

Please sign in to comment.