Files
cms-template/app/sitemap.ts
T
2026-08-22 17:29:31 +00:00

30 lines
586 B
TypeScript

import { type MetadataRoute } from 'next';
type Route = MetadataRoute.Sitemap[number];
type Params = Readonly<{
path: string;
changeFrequency?: Route['changeFrequency'];
priority?: Route['priority'];
}>;
const baseURL = 'https://<domain>';
function buildRoute({ path, changeFrequency = 'yearly', priority = 0.0 }: Params) {
const route = {
url: `${baseURL}${path}`,
changeFrequency,
priority
} as Route;
return route;
}
export default function sitemap(): MetadataRoute.Sitemap {
return [
buildRoute({ path: '/', changeFrequency: 'monthly', priority: 1.0 })
];
}