fix(tags): Set consistent titles for tags with description pages (#1671)

This commit is contained in:
Anton Bulakh 2024-12-27 02:50:06 +02:00 committed by GitHub
parent 69a0ddf733
commit 7533d504dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,6 +105,9 @@ export const TagPage: QuartzEmitterPlugin<Partial<TagPageOptions>> = (userOpts)
const tag = slug.slice("tags/".length)
if (tags.has(tag)) {
tagDescriptions[tag] = [tree, file]
if (file.data.frontmatter?.title === tag) {
file.data.frontmatter.title = `${i18n(cfg.locale).pages.tagContent.tag}: ${tag}`
}
}
}
}