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

Commit

Permalink
more specific with url ending with genindex.html
Browse files Browse the repository at this point in the history
  • Loading branch information
angelinekwan committed Jul 6, 2023
1 parent bb214d5 commit 5c3b489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/postprocess_sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if '404' in text:
url.decompose()
continue
if 'genindex.html' in text:
if text.endswith('genindex.html'):
loc.string = text[:-5] # removes the ".html"
elif text.endswith('index.html'):
loc.string = text[:-10] # removes the "index.html"
Expand Down

0 comments on commit 5c3b489

Please sign in to comment.