Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 09a67c1

Browse files
committed
fix lastmod date in sitemap
1 parent 37e8476 commit 09a67c1

File tree

1 file changed

+1
-2
lines changed
  • src/app/(sitemaps)/sitemap-0.xml

1 file changed

+1
-2
lines changed

src/app/(sitemaps)/sitemap-0.xml/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ interface SitemapItem {
99
priority: number
1010
}
1111

12-
const lastmod = new Date().toISOString()
1312
// Function to construct the XML structure of the sitemap index.
1413
export async function GET() {
1514
const pages: SitemapItem[] = allDocs.map((page) => ({
1615
loc: page.slug === '' ? URL : `${URL}/${page.slug}`,
17-
lastmod,
16+
lastmod: new Date(page.lastModified).toISOString(),
1817
changefreq: 'daily',
1918
priority: 0.7,
2019
}))

0 commit comments

Comments
 (0)