rebours/nextjs/src/app/sitemap.ts
ordinarthur bf5bf977e9
All checks were successful
Build & Deploy to K3s / build-and-deploy (push) Successful in 4m13s
feat: replace Astro + Sanity + Fastify with Next.js + Payload CMS
Single Next.js 15 app now serves frontend SSR, admin CMS, and Stripe API.
Replaces the Sanity quota-limited headless CMS with self-hosted Payload 3.0
on Postgres, removing the split-service topology (ssr/api/proxy → web).

- nextjs/: Next.js 15 app with Payload 3.0, Postgres adapter, Stripe plugin
- k8s/: new single-pod deployment + Postgres StatefulSet + PVCs (media, db)
- .gitea/workflows/deploy.yml: single-image build, tears down legacy pods

New Gitea secrets required: PAYLOAD_SECRET, POSTGRES_PASSWORD.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 10:28:29 +02:00

19 lines
611 B
TypeScript

import type { MetadataRoute } from 'next'
import { getPublishedProducts } from '@/lib/payload'
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const base = process.env.NEXT_PUBLIC_SERVER_URL || 'https://rebours.studio'
const products = await getPublishedProducts().catch(() => [])
const now = new Date()
return [
{ url: `${base}/`, lastModified: now, changeFrequency: 'weekly', priority: 1.0 },
...products.map((p) => ({
url: `${base}/collection/${p.slug}`,
lastModified: now,
changeFrequency: 'weekly' as const,
priority: 0.8,
})),
]
}