File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11import { MetadataRoute } from "next" ;
2- import { getAllPosts } from "@/lib/wordpress" ;
2+ // import { getAllPosts } from "@/lib/wordpress";
33import { siteConfig } from "@/site.config" ;
44
55export 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}
You can’t perform that action at this time.
0 commit comments