import { NextResponse } from "next/server" import { getChangelogPages, type ChangelogPageData } from "@/lib/changelog" import { siteConfig } from "@/lib/config" export const revalidate = false export async function GET() { const pages = getChangelogPages() const items = pages .map((page) => { const data = page.data as ChangelogPageData const date = page.date?.toUTCString() ?? new Date().toUTCString() const link = `${siteConfig.url}/docs/${page.slugs.join("/")}` return ` <![CDATA[${data.title}]]> ${link} ${link} ${date} ` }) .join("\n") const xml = ` ${siteConfig.name} Changelog ${siteConfig.url} ${siteConfig.description} en-us ${items} ` return new NextResponse(xml, { headers: { "Content-Type": "application/rss+xml; charset=utf-8", }, }) }