Skip to content

Commit e9a7924

Browse files
authored
Merge pull request #1329 from mcanouil/docs/reuse-sidebar
2 parents ecd5e7e + 33bdc4e commit e9a7924

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/websites/website-navigation.qmd

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,14 @@ Here are all of the options available for side navigation:
179179
| `collapse-level` | Whether to show sidebar navigation collapsed by default. The default is 2, which shows the top and next level fully expanded (but leaves the 3rd and subsequent levels collapsed). |
180180
| `pinned` | Always show a title bar that expands to show the sidebar at narrower screen widths (true or false). Defaults to false, and uses [headroom.js](https://wicky.nillia.ms/headroom.js/) to automatically show the navigation bar when the user scrolls up on the page. |
181181

182-
A single `sidebar` item without an `id` or `title` will result in a global sidebar applied to all pages. A sidebar with an `id` or `title` will only be applied to pages within the contents of the sidebar or pages that specify the sidebar id.
182+
A single `sidebar` item without an `id` or `title` will result in a global sidebar applied to all pages. A sidebar with an `id` or `title` will only be applied to pages within the contents of the sidebar or pages that specify the sidebar id.
183+
184+
To use a specific sidebar on a page or a group of pages, specify the `sidebar` ID in the front matter of the page or in the `_metadata.yml` file.
185+
For example, to include the tutorials sidebar on a page, add the following to the page's front matter:
186+
187+
```yaml
188+
sidebar: <id>
189+
```
183190

184191
For more information on controlling the appearance of the side navigation using HTML themes, see [HTML Themes - Navigation](/docs/output-formats/html-themes.qmd#navigation). If you need to control the width of the sidebar, see [Page Layout - Grid Customization](/docs/output-formats/page-layout.qmd#grid-customization).
185192

@@ -376,7 +383,6 @@ website:
376383
title: "Reference"
377384
contents:
378385
# navigation items
379-
380386
```
381387

382388
## Breadcrumbs

0 commit comments

Comments
 (0)