12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import { MetadataRoute } from 'next';
- import { allDocs, allGuides, allPages, allPosts } from '@/.contentlayer/generated';
- import { uiUrl } from '@/config/site';
- const pages = [
- 'testimonials',
- 'support',
- 'icons',
- 'guides',
- 'features',
- 'emails',
- 'emails/gallery',
- 'docs',
- 'blog'
- ];
- export default function sitemap(): MetadataRoute.Sitemap {
- return [
- {
- url: uiUrl,
- lastModified: new Date(),
- },
- ...pages.map((page) => ({
- url: `${uiUrl}/${page}`,
- lastModified: new Date(),
- })),
- ...allPages.map((page) => ({
- url: `${uiUrl}/${page.slugAsParams}`,
- lastModified: new Date(),
- })),
- ...[...allDocs, ...allGuides, ...allPosts].map((doc) => ({
- url: `${uiUrl}${doc.slug}`,
- lastModified: new Date(),
- })),
- ];
- }
|