We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 76982f1 + 8eca5da commit aca901aCopy full SHA for aca901a
2 files changed
_quarto.yml
@@ -1,6 +1,8 @@
1
project:
2
type: website
3
output-dir: _site
4
+ post-render:
5
+ - scripts/fix-sitemap.sh
6
7
resources:
8
- images/seedling_tiny_ps.svg
scripts/fix-sitemap.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Post-render script to fix sitemap URLs
+# Converts /path/index.html → /path/ to match canonical URLs
+
+SITEMAP="_site/sitemap.xml"
+if [ -f "$SITEMAP" ]; then
+ 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