From ca4258f1568d5eb23d3afc1d7febcf4886633d8d Mon Sep 17 00:00:00 2001 From: Stephen Tse Date: Wed, 26 Mar 2025 02:50:55 -0700 Subject: [PATCH] Updated breadcrumbs docs on ConditionalRender --- docs/features/breadcrumbs.md | 1 - docs/layout-components.md | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/features/breadcrumbs.md b/docs/features/breadcrumbs.md index a70185836..f3545059d 100644 --- a/docs/features/breadcrumbs.md +++ b/docs/features/breadcrumbs.md @@ -19,7 +19,6 @@ Component.Breadcrumbs({ spacerSymbol: "❯", // symbol between crumbs rootName: "Home", // name of first/root element resolveFrontmatterTitle: true, // whether to resolve folder names through frontmatter titles - hideOnRoot: true, // whether to hide breadcrumbs on root `index.md` page showCurrentPage: true, // whether to display the current page in the breadcrumbs }) ``` diff --git a/docs/layout-components.md b/docs/layout-components.md index 339ace8ec..45a95361a 100644 --- a/docs/layout-components.md +++ b/docs/layout-components.md @@ -81,4 +81,13 @@ Component.ConditionalRender({ }) ``` -This example would only render the Search component when the page is not in fullpage mode. +The example above would only render the Search component when the page is not in fullpage mode. + +```typescript +Component.ConditionalRender({ + component: Component.Breadcrumbs(), + condition: (page) => page.fileData.slug !== "index", +}), +``` + +The example above would hide breadcrumbs on the root `index.md` page. \ No newline at end of file