From 020d441a1ff12a12238d5e85436e80271bc18dae Mon Sep 17 00:00:00 2001 From: Mikhail Velikikh Date: Thu, 5 Sep 2024 09:22:19 +0100 Subject: [PATCH] Make match_path OS agnostic `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 --- mkdocs_rss_plugin/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs_rss_plugin/plugin.py b/mkdocs_rss_plugin/plugin.py index c4ab87f..703c6c1 100644 --- a/mkdocs_rss_plugin/plugin.py +++ b/mkdocs_rss_plugin/plugin.py @@ -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