Skip to content

Commit bf24893

Browse files
committed
fix: add sitemap
1 parent b177a9a commit bf24893

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/sitemap.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { BLOGS_DIR } from '@/utils/markdown';
22
import fs from 'fs';
33
import type { MetadataRoute } from 'next';
44

5+
const lastModified = new Date()
6+
57
import { getStaticParams } from '@/locales/server';
68
import path from 'path';
79
export default function sitemap(): MetadataRoute.Sitemap {
@@ -42,7 +44,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
4244
url: `https://kubeblocks.io/docs/${version}/${category}/${items?.join(
4345
'/',
4446
)}`,
45-
lastModified: new Date(),
47+
lastModified,
4648
changeFrequency: 'weekly',
4749
priority: 0.5,
4850
});
@@ -59,7 +61,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
5961
.forEach((f) => {
6062
sitemap.push({
6163
url: `https://kubeblocks.io/blog/${f.replace(/\.mdx/, '')}`,
62-
lastModified: new Date(),
64+
lastModified,
6365
changeFrequency: 'weekly',
6466
priority: 0.5,
6567
});

0 commit comments

Comments
 (0)