fix: make rss.xml file statically-generated
This commit is contained in:
parent
fb48d4232d
commit
ae6cc2ff44
2 changed files with 3 additions and 0 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue