Erste brauchbare Version
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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 })
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user