fix: sitemap路径拼写不正确的问题
This commit is contained in:
@@ -5,7 +5,7 @@ const site = metadata.site
|
||||
|
||||
const staticUrls = [
|
||||
'',
|
||||
'/archives',
|
||||
'/archive',
|
||||
'/search',
|
||||
];
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export const GET: APIRoute = async (context) => {
|
||||
|
||||
const xml = `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
${urls.map((post) => `<url>
|
||||
<loc>${site}/${post.slug}</loc>
|
||||
<loc>${site}/post/${post.slug}</loc>
|
||||
<lastmod>${dayjs(post.updated_at || post.created_at).toISOString()}</lastmod>
|
||||
</url>`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user