Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2003 from aiven/fix-broken-page-in-sitemap
Browse files Browse the repository at this point in the history
include / for genindex and index
  • Loading branch information
angelinekwan authored Jul 14, 2023
2 parents 2d8feed + 756c00e commit f1f291f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/postprocess_sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
if '404' in text:
url.decompose()
continue
if text.endswith('genindex.html'):
if text.endswith('/genindex.html'):
loc.string = text[:-5] # removes the ".html"
elif text.endswith('index.html'):
elif text.endswith('/index.html'):
loc.string = text[:-10] # removes the "index.html"
elif text.endswith('.html'):
loc.string = text[:-5] # removes the ".html"
Expand Down

0 comments on commit f1f291f

Please sign in to comment.