Files
buzz-sheet/app/sitemap.ts
T
gunshiz 7c8ecd0915
CI / Verify (push) Failing after 47s
CI / Build immutable images and deploy (push) Has been skipped
feat : add sitemao and some SEO
2026-09-13 15:53:08 +07:00

18 lines
482 B
TypeScript

import type { MetadataRoute } from "next";
import { connection } from "next/server";
import { getCachedPublicGuideCards } from "@/lib/cache/public";
import { siteUrl } from "@/lib/site-url";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
await connection();
const guides = await getCachedPublicGuideCards();
return [
{ url: siteUrl },
...guides.map((guide) => ({
url: `${siteUrl}/${encodeURIComponent(guide.slug)}`,
})),
];
}