💄 Allow slash as post divider

This commit is contained in:
2024-08-17 22:38:13 +08:00
parent 2169e9c564
commit 0eaec5dd8d
6 changed files with 28 additions and 7 deletions

View File

@ -5,7 +5,7 @@ export default defineSitemapEventHandler(async () => {
const result = await res.json()
return result.data.map((item: any) => asSitemapUrl({
loc: item.alias ? `/posts/${item.area_alias}:${item.alias}` : `/posts/${item.id}`,
loc: item.alias ? `/posts/${item.area_alias}/${item.alias}` : `/posts/${item.id}`,
lastmod: item.edited_at ?? item.published_at,
priority: 0.7,
_sitemap: "posts",