Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

seo: auto-sync sitemap + IndexNow ping script

PurpleDoubleD1889e81bd9f7
diff --git a/docs/scripts/ping-indexnow.sh b/docs/scripts/ping-indexnow.sh
new file mode 100755
index 00000000..4a377d6a
--- /dev/null
+++ b/docs/scripts/ping-indexnow.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# Auto-sync sitemap with blog posts + ping IndexNow
+# Run after publishing new blog posts
+
+DOCS_DIR="$(cd "$(dirname "$0")/.." && pwd)"
+SITEMAP="$DOCS_DIR/sitemap.xml"
+DOMAIN="https://locallyuncensored.com"
+KEY="64c8084e74dd0e16c6152f82363537ad"
+
+# Find all blog HTML files
+NEW_URLS=""
+for f in "$DOCS_DIR"/blog/*.html; do
+ fname=$(basename "$f")
+ url="$DOMAIN/blog/$fname"
+ if ! grep -q "$url" "$SITEMAP" 2>/dev/null; then
+ # Add to sitemap before closing </urlset>
+ DATE=$(date +%Y-%m-%d)
+ ENTRY=" <url><loc>$url</loc><lastmod>$DATE</lastmod><changefreq>monthly</changefreq><priority>0.9</priority></url>"
+ sed -i "s|</urlset>|$ENTRY\n</urlset>|" "$SITEMAP"
+ NEW_URLS="$NEW_URLS\"$url\","
+ echo "Added to sitemap: $fname"
+ fi
+done
+
+# Also always include homepage
+ALL_URLS=$(grep -oP '(?<=<loc>)[^<]+' "$SITEMAP" | while read u; do echo "\"$u\""; done | paste -sd,)
+
+if [ -n "$NEW_URLS" ]; then
+ # Ping IndexNow with new URLs
+ curl -s -X POST "https://api.indexnow.org/IndexNow" \
+ -H "Content-Type: application/json" \
+ -d "{
+ \"host\": \"locallyuncensored.com\",
+ \"key\": \"$KEY\",
+ \"keyLocation\": \"$DOMAIN/$KEY.txt\",
+ \"urlList\": [$ALL_URLS]
+ }" -w "\nIndexNow: HTTP %{http_code}\n"
+ echo "Pinged IndexNow with all URLs"
+else
+ echo "No new blog posts found"
+fi
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index 96b76db1..a5cf31c4 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -17,4 +17,5 @@
<url><loc>https://locallyuncensored.com/blog/how-to-generate-ai-videos-locally.html</loc><lastmod>2026-04-02</lastmod><changefreq>monthly</changefreq><priority>0.9</priority></url>
<url><loc>https://locallyuncensored.com/blog/comfyui-beginners-guide.html</loc><lastmod>2026-04-02</lastmod><changefreq>monthly</changefreq><priority>0.9</priority></url>
<url><loc>https://locallyuncensored.com/blog/why-run-ai-locally.html</loc><lastmod>2026-04-02</lastmod><changefreq>monthly</changefreq><priority>0.9</priority></url>
+ <url><loc>https://locallyuncensored.com/blog/index.html</loc><lastmod>2026-04-04</lastmod><changefreq>monthly</changefreq><priority>0.9</priority></url>
</urlset>
\ No newline at end of file