Skip to content

Commit b397dae

Browse files
authored
Updating breadcrumbs docs on ConditionalRender (#1871)
1 parent 23b691f commit b397dae

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/features/breadcrumbs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Component.Breadcrumbs({
1919
spacerSymbol: "", // symbol between crumbs
2020
rootName: "Home", // name of first/root element
2121
resolveFrontmatterTitle: true, // whether to resolve folder names through frontmatter titles
22-
hideOnRoot: true, // whether to hide breadcrumbs on root `index.md` page
2322
showCurrentPage: true, // whether to display the current page in the breadcrumbs
2423
})
2524
```

docs/layout-components.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,13 @@ Component.ConditionalRender({
8181
})
8282
```
8383
84-
This example would only render the Search component when the page is not in fullpage mode.
84+
The example above would only render the Search component when the page is not in fullpage mode.
85+
86+
```typescript
87+
Component.ConditionalRender({
88+
component: Component.Breadcrumbs(),
89+
condition: (page) => page.fileData.slug !== "index",
90+
})
91+
```
92+
93+
The example above would hide breadcrumbs on the root `index.md` page.

0 commit comments

Comments
 (0)