From d5cb47067cc6d1ea786239486ffbf75aa6590523 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 1 Dec 2020 13:56:03 +0100 Subject: [PATCH] Fix: don't strip "Main Page" from sitemap (#100) Bing.com for one doesn't seem to pick up URLs ending with /. Hopefully is adding "Main Page" behind it again a solution that works for it. There isn't really a drawback here, other than an URL that looks a bit more ugly. --- truewiki/views/sitemap.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/truewiki/views/sitemap.py b/truewiki/views/sitemap.py index b987fc0..9ad0317 100644 --- a/truewiki/views/sitemap.py +++ b/truewiki/views/sitemap.py @@ -34,8 +34,6 @@ def view() -> web.Response: for page, page_data in metadata.PAGES.items(): if page.startswith("Page/"): page = page[len("Page/") :] - if page.endswith("/Main Page"): - page = page[: -len("/Main Page")] + "/" page = urllib.parse.quote(page) body += "\n"