Repository navigation
v1.2.2
Fixes the sitemap and the RSS feed going stale after a publish.
Publishing the first blog post exposed it. The post was live, rendered
correctly and served a valid canonical — but /sitemap.xml did not list
it, and would not have for up to an hour.
revalidatePath("/", "layout") invalidates the root layout, every nested
layout and every page beneath them. The sitemap and the feed are route
handlers, not pages, so they are outside that tree. Each carried its own
revalidate = 3600 and kept serving build-time output until it expired.
The failure is quiet: the post itself is fine, so nothing on the site
suggests the sitemap is a post behind. The hour it stays wrong is the
hour a newly published post most needs a crawler to find it.
/api/revalidate now invalidates /sitemap.xml and /blog/rss.xml
explicitly, alongside the existing layout call.
Verified against a real production build rather than assumed. The
sitemap stamps lastmod at generation time, which makes regeneration
observable: it held steady across repeated fetches, then advanced
immediately after a revalidate call.
- Production still requires a manual "Promote to Production" in Vercel;
the stale main branch remains the likely cause. - Callout blocks (> [!NOTE]) are not rendered.
- The admin blog editor cannot reference a Cloudinary asset that already
exists — only upload a new one, so re-using an image duplicates it.