This commit is contained in:
Timothy 2023-11-20 23:12:38 +08:00 committed by GitHub
parent f6762c350a
commit fa262d0419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,8 @@ import siteMetadata from '@/data/siteMetadata'
export default function sitemap(): MetadataRoute.Sitemap {
const siteUrl = siteMetadata.siteUrl
const blogRoutes = allBlogs.filter((post) => !post.draft)
const blogRoutes = allBlogs
.filter((post) => !post.draft)
.map((post) => ({
url: `${siteUrl}/${post.path}`,
lastModified: post.lastmod || post.date,