Skip to content

Commit

Permalink
Revert "[Docs Site] Don't show breadcrumbs on /products/ (#17240)"
Browse files Browse the repository at this point in the history
This reverts commit 72bfe6a.
  • Loading branch information
KimJ15 authored Sep 30, 2024
1 parent 4726b01 commit 371077f
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions src/components/overrides/PageTitle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const updated = Astro.props.entry.data.updated;
const badge = Astro.props.entry.data.sidebar?.badge;
const summary = Astro.props.entry.data.summary;
const slug = Astro.props.entry.slug;
const showBreadcrumbs = !["products"].includes(slug);
const breadcrumbProps: Record<string, any> = {
crumbs: [
{
Expand All @@ -34,6 +30,8 @@ const breadcrumbProps: Record<string, any> = {
id: "breadcrumbs",
};
const slug = Astro.props.entry.slug;
const segments = slug.split("/");
for (let i = 0; i < segments.length; i++) {
Expand Down Expand Up @@ -75,27 +73,21 @@ for (let i = 0; i < segments.length; i++) {
const hideTitle = Astro.props.hideTitle;
---

{
showBreadcrumbs && (
<Breadcrumbs {...breadcrumbProps}>
<svg
slot="separator"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="9 18 15 12 9 6" />
</svg>
</Breadcrumbs>
)
}

<Breadcrumbs {...breadcrumbProps}>
<svg
slot="separator"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
><polyline points="9 18 15 12 9 6"></polyline>
</svg>
</Breadcrumbs>
{!hideTitle && <Default {...Astro.props} />}

{badge && <Badge variant={badge.variant} text={badge.text} />}
Expand Down

0 comments on commit 371077f

Please sign in to comment.