Merge pull request #15 from alerodrod/fix-breadcrumbs-for-single-pages

Fix Breadcrumbs for single pages
This commit is contained in:
Somrat
2023-10-01 08:46:36 +06:00
committed by GitHub
+1 -1
View File
@@ -16,7 +16,7 @@ paths.forEach((label: string, i: number) => {
const href = `/${paths.slice(0, i + 1).join("/")}`;
label !== "page" &&
parts.push({
label: humanize(label.replace(/[-_]/g, " ")) || "",
label: humanize(label.replace(".html", "").replace(/[-_]/g, " ")) || "",
href,
"aria-label": Astro.url.pathname === href ? "page" : undefined,
});