seo: add tag pages to sitemap
This commit is contained in:
parent
8bc1493821
commit
8dde510a59
1 changed files with 8 additions and 0 deletions
|
@ -11,6 +11,14 @@ export async function GET(context: APIContext) {
|
|||
<url><loc>${context.site}services</loc></url>
|
||||
<url><loc>${context.site}cinema</loc></url>`
|
||||
|
||||
notes
|
||||
.map(entry => entry.data.tags)
|
||||
.flat()
|
||||
.filter((tag, i, self) => self.findIndex(t => t.slug === tag.slug) === i)
|
||||
.forEach(tag => {
|
||||
sitemap += `<url><loc>${context.site}tags/${tag.slug}</loc></url>`
|
||||
})
|
||||
|
||||
notes.forEach(note => {
|
||||
sitemap += `<url><loc>${context.site}notes/${note.slug}</loc></url>`
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue