Skip to content

Commit 06de3d9

Browse files
committed
🗺️ Update sitemap.xml to include all generated documentation pages
- Added 22+ documentation pages to sitemap for better SEO coverage - Included all existing generated HTML pages from site/docs/ - Added entries for new CLI reference and custom structures pages - All pages configured with proper SEO attributes (lastmod, changefreq, priority) - Created update-sitemap.sh script for future maintenance Sitemap now covers: - Configuration, hooks, development guides - Template variables, examples, file handling - Installation, usage, contributing docs - GitHub integration, schemas, mappings - And all other generated documentation pages Total URLs: 29 (up from ~7), Documentation pages: 26
1 parent fdb4ffd commit 06de3d9

2 files changed

Lines changed: 229 additions & 0 deletions

File tree

site/sitemap.xml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,168 @@
8181
<priority>0.7</priority>
8282
</url>
8383

84+
<!-- Generated Documentation Pages -->
85+
86+
<url>
87+
<loc>https://httpdss.github.io/struct/docs/configuration/</loc>
88+
<lastmod>2025-08-02</lastmod>
89+
<changefreq>weekly</changefreq>
90+
<priority>0.8</priority>
91+
</url>
92+
93+
<url>
94+
<loc>https://httpdss.github.io/struct/docs/hooks/</loc>
95+
<lastmod>2025-08-02</lastmod>
96+
<changefreq>weekly</changefreq>
97+
<priority>0.8</priority>
98+
</url>
99+
100+
<url>
101+
<loc>https://httpdss.github.io/struct/docs/development/</loc>
102+
<lastmod>2025-08-02</lastmod>
103+
<changefreq>weekly</changefreq>
104+
<priority>0.8</priority>
105+
</url>
106+
107+
<url>
108+
<loc>https://httpdss.github.io/struct/docs/vhs/</loc>
109+
<lastmod>2025-08-02</lastmod>
110+
<changefreq>weekly</changefreq>
111+
<priority>0.8</priority>
112+
</url>
113+
114+
<url>
115+
<loc>https://httpdss.github.io/struct/docs/template-variables/</loc>
116+
<lastmod>2025-08-02</lastmod>
117+
<changefreq>weekly</changefreq>
118+
<priority>0.8</priority>
119+
</url>
120+
121+
<url>
122+
<loc>https://httpdss.github.io/struct/docs/known-issues/</loc>
123+
<lastmod>2025-08-02</lastmod>
124+
<changefreq>weekly</changefreq>
125+
<priority>0.8</priority>
126+
</url>
127+
128+
<url>
129+
<loc>https://httpdss.github.io/struct/docs/articles/</loc>
130+
<lastmod>2025-08-02</lastmod>
131+
<changefreq>weekly</changefreq>
132+
<priority>0.8</priority>
133+
</url>
134+
135+
<url>
136+
<loc>https://httpdss.github.io/struct/docs/404/</loc>
137+
<lastmod>2025-08-02</lastmod>
138+
<changefreq>weekly</changefreq>
139+
<priority>0.8</priority>
140+
</url>
141+
142+
<url>
143+
<loc>https://httpdss.github.io/struct/docs/installation/</loc>
144+
<lastmod>2025-08-02</lastmod>
145+
<changefreq>weekly</changefreq>
146+
<priority>0.8</priority>
147+
</url>
148+
149+
<url>
150+
<loc>https://httpdss.github.io/struct/docs/schema/</loc>
151+
<lastmod>2025-08-02</lastmod>
152+
<changefreq>weekly</changefreq>
153+
<priority>0.8</priority>
154+
</url>
155+
156+
<url>
157+
<loc>https://httpdss.github.io/struct/docs/usage/</loc>
158+
<lastmod>2025-08-02</lastmod>
159+
<changefreq>weekly</changefreq>
160+
<priority>0.8</priority>
161+
</url>
162+
163+
<url>
164+
<loc>https://httpdss.github.io/struct/docs/completion/</loc>
165+
<lastmod>2025-08-02</lastmod>
166+
<changefreq>weekly</changefreq>
167+
<priority>0.8</priority>
168+
</url>
169+
170+
<url>
171+
<loc>https://httpdss.github.io/struct/docs/structures/</loc>
172+
<lastmod>2025-08-02</lastmod>
173+
<changefreq>weekly</changefreq>
174+
<priority>0.8</priority>
175+
</url>
176+
177+
<url>
178+
<loc>https://httpdss.github.io/struct/docs/contributing/</loc>
179+
<lastmod>2025-08-02</lastmod>
180+
<changefreq>weekly</changefreq>
181+
<priority>0.8</priority>
182+
</url>
183+
184+
<url>
185+
<loc>https://httpdss.github.io/struct/docs/github-integration/</loc>
186+
<lastmod>2025-08-02</lastmod>
187+
<changefreq>weekly</changefreq>
188+
<priority>0.8</priority>
189+
</url>
190+
191+
<url>
192+
<loc>https://httpdss.github.io/struct/docs/examples/</loc>
193+
<lastmod>2025-08-02</lastmod>
194+
<changefreq>weekly</changefreq>
195+
<priority>0.8</priority>
196+
</url>
197+
198+
<url>
199+
<loc>https://httpdss.github.io/struct/docs/file-handling/</loc>
200+
<lastmod>2025-08-02</lastmod>
201+
<changefreq>weekly</changefreq>
202+
<priority>0.8</priority>
203+
</url>
204+
205+
<url>
206+
<loc>https://httpdss.github.io/struct/docs/index.html</loc>
207+
<lastmod>2025-08-02</lastmod>
208+
<changefreq>weekly</changefreq>
209+
<priority>0.8</priority>
210+
</url>
211+
212+
<url>
213+
<loc>https://httpdss.github.io/struct/docs/mappings/</loc>
214+
<lastmod>2025-08-02</lastmod>
215+
<changefreq>weekly</changefreq>
216+
<priority>0.8</priority>
217+
</url>
218+
219+
<url>
220+
<loc>https://httpdss.github.io/struct/docs/quickstart/</loc>
221+
<lastmod>2025-08-02</lastmod>
222+
<changefreq>weekly</changefreq>
223+
<priority>0.8</priority>
224+
</url>
225+
226+
<url>
227+
<loc>https://httpdss.github.io/struct/docs/funding/</loc>
228+
<lastmod>2025-08-02</lastmod>
229+
<changefreq>weekly</changefreq>
230+
<priority>0.8</priority>
231+
</url>
232+
233+
<!-- New Documentation Pages (will be built) -->
234+
<url>
235+
<loc>https://httpdss.github.io/struct/docs/cli-reference/</loc>
236+
<lastmod>2025-08-02</lastmod>
237+
<changefreq>weekly</changefreq>
238+
<priority>0.9</priority>
239+
</url>
240+
241+
<url>
242+
<loc>https://httpdss.github.io/struct/docs/custom-structures/</loc>
243+
<lastmod>2025-08-02</lastmod>
244+
<changefreq>weekly</changefreq>
245+
<priority>0.9</priority>
246+
</url>
247+
84248
</urlset>

site/update-sitemap.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
# Script to automatically update sitemap.xml with all generated documentation pages
4+
# Usage: ./update-sitemap.sh
5+
6+
SITEMAP_FILE="sitemap.xml"
7+
DOCS_DIR="docs"
8+
BASE_URL="https://httpdss.github.io/struct"
9+
TODAY=$(date +%Y-%m-%d)
10+
11+
echo "📄 Updating sitemap.xml with generated documentation pages..."
12+
13+
# Backup original sitemap
14+
cp "$SITEMAP_FILE" "${SITEMAP_FILE}.backup"
15+
16+
# Find all HTML files in docs directory
17+
echo "🔍 Finding HTML files in $DOCS_DIR..."
18+
html_files=$(find "$DOCS_DIR" -name "*.html" | sort)
19+
20+
# Count files
21+
file_count=$(echo "$html_files" | wc -l)
22+
echo "📊 Found $file_count HTML files to add to sitemap"
23+
24+
# Create temporary file with new entries
25+
temp_file=$(mktemp)
26+
27+
# Copy everything before </urlset>
28+
sed '/<\/urlset>/d' "$SITEMAP_FILE" > "$temp_file"
29+
30+
# Add comment for generated docs
31+
echo "" >> "$temp_file"
32+
echo " <!-- Generated Documentation Pages (auto-updated $(date)) -->" >> "$temp_file"
33+
echo "" >> "$temp_file"
34+
35+
# Add each HTML file as a URL entry
36+
while IFS= read -r file; do
37+
# Convert file path to URL path
38+
url_path=${file#docs/}
39+
40+
# Remove index.html from path for cleaner URLs
41+
if [[ "$url_path" == */index.html ]]; then
42+
url_path=${url_path%/index.html}/
43+
fi
44+
45+
# Add URL entry
46+
echo " <url>" >> "$temp_file"
47+
echo " <loc>$BASE_URL/$file</loc>" >> "$temp_file"
48+
echo " <lastmod>$TODAY</lastmod>" >> "$temp_file"
49+
echo " <changefreq>weekly</changefreq>" >> "$temp_file"
50+
echo " <priority>0.8</priority>" >> "$temp_file"
51+
echo " </url>" >> "$temp_file"
52+
echo "" >> "$temp_file"
53+
done <<< "$html_files"
54+
55+
# Close urlset
56+
echo "</urlset>" >> "$temp_file"
57+
58+
# Replace original sitemap
59+
mv "$temp_file" "$SITEMAP_FILE"
60+
61+
echo "✅ Sitemap updated successfully!"
62+
echo "📈 Total URLs in sitemap: $(grep -c '<url>' "$SITEMAP_FILE")"
63+
echo "📂 Documentation pages: $(grep -c "docs/" "$SITEMAP_FILE")"
64+
echo ""
65+
echo "💡 Backup created: ${SITEMAP_FILE}.backup"

0 commit comments

Comments
 (0)