Skip to content

Commit a44922c

Browse files
authored
Make match_path OS agnostic (#323)
`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 '/'. fixes #321
2 parents a168516 + 020d441 commit a44922c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkdocs_rss_plugin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def on_page_content(
275275
return
276276

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

281281
# skip pages with draft=true

0 commit comments

Comments
 (0)