chore(breadcrumbs): Add slug for breadcrumbs on tag page

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-03 03:45:45 -04:00
parent 50c78cdf63
commit c73e64e1d2
No known key found for this signature in database
GPG Key ID: 18974753009D2BFA

View File

@ -153,6 +153,10 @@ export default ((opts?: Partial<BreadcrumbOptions>) => {
crumbs.push(crumb) crumbs.push(crumb)
} }
if (isTagPath) {
crumbs.push({ displayName: slugParts.at(-1) ?? "", path: "" })
}
// Add current file to crumb (can directly use frontmatter title) // Add current file to crumb (can directly use frontmatter title)
if (options.showCurrentPage && slugParts.at(-1) !== "index") { if (options.showCurrentPage && slugParts.at(-1) !== "index") {
crumbs.push({ crumbs.push({