Skip to content

Commit 4a41666

Browse files
committed
Update python-sitemap.py
1 parent 9b5bad8 commit 4a41666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python-sitemap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def generate_sitemap():
1313
if 'permalink' in post:
1414
permalink = post['permalink']
1515
# Use permalink as-is if it has a domain, otherwise prepend base_url
16-
url = permalink if permalink.startswith(('http://', 'https://')) else f"{base_url}/{permalink}"
16+
url = permalink if permalink.startswith(('http://', 'https://')) else f"{base_url}/{permalink.lstrip('/')}"
1717
# Skip dash.plotly.com URLs
1818
if 'dash.plotly.com' in url:
1919
continue

0 commit comments

Comments
 (0)