Skip to content

Commit

Permalink
add sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
calvo-jp committed Mar 1, 2024
1 parent 01a39a9 commit 3266d06
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions website/src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
import type {MetadataRoute} from 'next';
import {getIcons} from './utils';

const url = 'https://untitled-theme-docs.vercel.app';

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const icons = await getIcons();

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: 'https://untitled-theme-docs.vercel.app',
url,
priority: 1,
lastModified: new Date(),
changeFrequency: 'monthly',
priority: 1,
},

...icons.map<MetadataRoute.Sitemap[number]>((icon) => ({
url: `${url}/icons/${icon.slug}`,
priority: 0.8,
lastModified: new Date(),
changeFrequency: 'monthly',
})),
];
}

0 comments on commit 3266d06

Please sign in to comment.