mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
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 ` <item>
|
|
<title><![CDATA[${data.title}]]></title>
|
|
<link>${link}</link>
|
|
<guid>${link}</guid>
|
|
<description><![CDATA[${data.description || ""}]]></description>
|
|
<pubDate>${date}</pubDate>
|
|
</item>`
|
|
})
|
|
.join("\n")
|
|
|
|
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<channel>
|
|
<title>${siteConfig.name} Changelog</title>
|
|
<link>${siteConfig.url}</link>
|
|
<description>${siteConfig.description}</description>
|
|
<language>en-us</language>
|
|
<atom:link href="${siteConfig.url}/rss.xml" rel="self" type="application/rss+xml"/>
|
|
${items}
|
|
</channel>
|
|
</rss>`
|
|
|
|
return new NextResponse(xml, {
|
|
headers: {
|
|
"Content-Type": "application/rss+xml; charset=utf-8",
|
|
},
|
|
})
|
|
}
|