Skip to content

Commit 9d202ea

Browse files
committed
fix: comment out post in sitemap
1 parent ee7094a commit 9d202ea

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

app/sitemap.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { MetadataRoute } from "next";
2-
import { getAllPosts } from "@/lib/wordpress";
2+
// import { getAllPosts } from "@/lib/wordpress";
33
import { siteConfig } from "@/site.config";
44

55
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
6-
const posts = await getAllPosts();
6+
// const posts = await getAllPosts();
77

88
const staticUrls: MetadataRoute.Sitemap = [
99
{
@@ -44,12 +44,12 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
4444
},
4545
];
4646

47-
const postUrls: MetadataRoute.Sitemap = posts.map((post) => ({
48-
url: `${siteConfig.site_domain}/posts/${post.slug}`,
49-
lastModified: new Date(post.modified),
50-
changeFrequency: "weekly",
51-
priority: 0.5,
52-
}));
47+
// const postUrls: MetadataRoute.Sitemap = posts.map((post) => ({
48+
// url: `${siteConfig.site_domain}/posts/${post.slug}`,
49+
// lastModified: new Date(post.modified),
50+
// changeFrequency: "weekly",
51+
// priority: 0.5,
52+
// }));
5353

54-
return [...staticUrls, ...postUrls];
54+
return staticUrls // [...staticUrls, ...postUrls];
5555
}

0 commit comments

Comments
 (0)