From 43a6d929ce1a21d9ae404582d94841edf9ad6f05 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 1 May 2022 16:39:06 +0200 Subject: [PATCH] Fixed issue with OS-specific paths in tags plugin --- src/plugins/tags/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/tags/plugin.py b/src/plugins/tags/plugin.py index be9678e93..69910442c 100644 --- a/src/plugins/tags/plugin.py +++ b/src/plugins/tags/plugin.py @@ -107,15 +107,15 @@ class TagsPlugin(BasePlugin): content = [f"## {tag}", ""] for page in pages: url = utils.get_relative_url( - page.file.src_path, - self.tags_file.src_path + page.file.src_path.replace(os.path.sep, "/"), + self.tags_file.src_path.replace(os.path.sep, "/") ) # Ensure forward slashes, as we have to use the path of the source # file which contains the operating system's path separator. content.append("- [{}]({})".format( page.meta.get("title", page.title), - url.replace(os.path.sep, "/") + url )) # Return rendered tag links