import { NextResponse } from "next/server"; import { getPosts } from "@/lib/posts"; const SITE_URL = "https://denizbektas.com.tr"; export async function GET() { const posts = getPosts("blog"); const items = posts .map( (post) => ` <![CDATA[${post.title}]]> ${SITE_URL}/blog/${post.slug} ${SITE_URL}/blog/${post.slug} ${new Date(post.date).toUTCString()} ` ) .join("\n"); const xml = ` Deniz Bektaş — Kişisel Blog ${SITE_URL}/blog Kişisel blog yazıları tr ${new Date().toUTCString()} ${items} `; return new NextResponse(xml, { headers: { "Content-Type": "application/xml; charset=utf-8", "Cache-Control": "public, max-age=3600" }, }); }