Skip to content

Commit

Permalink
fix: rework hideBreadcrumbs param to breadcrumbs; update docs accordi…
Browse files Browse the repository at this point in the history
…ngly
  • Loading branch information
ggwicz committed Apr 22, 2024
1 parent 9e2c014 commit 7a0cdf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions exampleSite/content/docs/guide/organize-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ weight: 2

## Breadcrumb Navigation

Breadcrumbs are auto-generated based on the directory structure of `/content`.
Breadcrumbs are auto-generated based on the directory structure of `/content`.

For example, consider the file structure [demonstrated above](#directory-structure). Given that structure, the breadcrumbs atop the page at `/docs/guide/organize-files/` would appear automatically as follows:

Expand Down Expand Up @@ -112,11 +112,11 @@ Documentation > Guide > Foo Bar

### Hiding Breadcrumbs

You can hide breadcrumbs completely from a page by specfying `hideBreadcrumbs: true` in its front matter:
You can hide breadcrumbs completely from a page by specfying `breadcrumbs: false` in its front matter:

```yaml {filename="content/docs/guide/organize-files.md"}
---
hideBreadcrumbs: true
breadcrumbs: false
title: Organize Files
---
```
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/breadcrumb.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not (default false .Params.hideBreadcrumbs) }}
{{- if (default true .Params.breadcrumbs) }}
<div class="hx-mt-1.5 hx-flex hx-items-center hx-gap-1 hx-overflow-hidden hx-text-sm hx-text-gray-500 dark:hx-text-gray-400 contrast-more:hx-text-current">
{{- range .Ancestors.Reverse }}
{{- if not .IsHome }}
Expand All @@ -12,4 +12,4 @@
{{- partial "utils/title" . -}}
</div>
</div>
{{ end -}}
{{ end -}}

0 comments on commit 7a0cdf8

Please sign in to comment.