feat(seo): add JSON-LD, OG images and RSS feed for news
CI / check (push) Successful in 29s
CI / tests-unit (push) Successful in 2m17s
CI / tests-integration (push) Successful in 2m29s
CI / tests-imaging-browsers (push) Successful in 2m32s
CI / tests-quality (push) Failing after 2m18s
CI / tests-ui (push) Successful in 5m14s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 2m41s

This commit is contained in:
openhands committed 2026-10-22 18:22:32 +02:00
1 parent 97454f361b
commit 30583b8e2e
7 files changed
+328 -11

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { resolveHotelName } from "@/lib/hotel-name";
import { buildNewsRss } from "@/lib/news-rss";
import { appBaseUrl } from "@/lib/seo";
import { getNewsList } from "@/lib/services/news-list";
// Built per request so the feed never needs a database connection during
// `next build`, matching the sitemap and robots routes.
export const dynamic = "force-dynamic";
export async function GET() {
const [hotelName, items] = await Promise.all([
resolveHotelName(),
getNewsList(30),
]);
return new Response(
buildNewsRss(items, { hotelName, appUrl: appBaseUrl() }),
{
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, s-maxage=300, stale-while-revalidate=600",
},
},
);
}