mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
20 lines
534 B
TypeScript
20 lines
534 B
TypeScript
import { source } from "@/lib/source";
|
|
import { url } from "@/utils/metadata";
|
|
import type { MetadataRoute } from "next";
|
|
|
|
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
|
return [
|
|
...(await Promise.all(
|
|
source.getPages().map(async (page) => {
|
|
const { lastModified } = page.data;
|
|
return {
|
|
url: url(page.url),
|
|
lastModified: lastModified ? new Date(lastModified) : undefined,
|
|
changeFrequency: "weekly",
|
|
priority: 0.5,
|
|
} as MetadataRoute.Sitemap[number];
|
|
}),
|
|
)),
|
|
];
|
|
}
|