diff --git a/app/api/revalidate/route.ts b/app/api/revalidate/route.ts index 2298981..d581325 100644 --- a/app/api/revalidate/route.ts +++ b/app/api/revalidate/route.ts @@ -46,6 +46,7 @@ export async function POST(req: NextRequest) { if (body.slug.current) { revalidatePath(`/blog/${body.slug.current}`); revalidatePath("/sitemap.xml"); + revalidatePath("/rss.xml"); } revalidatePath("/blog"); diff --git a/app/rss.xml/route.ts b/app/rss.xml/route.ts index 780e59d..02e592c 100644 --- a/app/rss.xml/route.ts +++ b/app/rss.xml/route.ts @@ -3,6 +3,8 @@ import RSS from "rss"; import { client } from "@/lib/sanity"; import { toHTML } from "@portabletext/to-html"; +export const dynamic = "force-static"; + export async function GET() { // Define the site URL based on the environment const SITE_URL =