Skip to content

Commit aca901a

Browse files
authored
Merge pull request #11 from vrognas/claude/fix-page-indexing-012nn9nSRrX3Ajd6qYeSZKfw
Fix page indexing issues
2 parents 76982f1 + 8eca5da commit aca901a

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
project:
22
type: website
33
output-dir: _site
4+
post-render:
5+
- scripts/fix-sitemap.sh
46

57
resources:
68
- images/seedling_tiny_ps.svg

scripts/fix-sitemap.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Post-render script to fix sitemap URLs
3+
# Converts /path/index.html → /path/ to match canonical URLs
4+
5+
SITEMAP="_site/sitemap.xml"
6+
7+
if [ -f "$SITEMAP" ]; then
8+
echo "Fixing sitemap URLs to match canonical format..."
9+
10+
# Replace index.html with trailing slash in sitemap
11+
# This ensures sitemap URLs match the canonical URLs
12+
sed -i 's|/index\.html</loc>|/</loc>|g' "$SITEMAP"
13+
14+
echo "Sitemap fixed: index.html suffixes removed"
15+
else
16+
echo "Warning: sitemap.xml not found at $SITEMAP"
17+
fi

0 commit comments

Comments
 (0)