From ea24a03af8e4b9130492487c6b5e97de79ad5a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:17:40 +0200 Subject: [PATCH 1/3] docs: add note and example on how to reuse a sidebar for a page --- docs/websites/website-navigation.qmd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/websites/website-navigation.qmd b/docs/websites/website-navigation.qmd index fade26f562..32b2c71293 100644 --- a/docs/websites/website-navigation.qmd +++ b/docs/websites/website-navigation.qmd @@ -377,7 +377,13 @@ website: title: "Reference" contents: # navigation items - +``` + +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. +For example, to include the tutorials sidebar, from the above example, on a page, add the following to the page's front matter: + +```yaml +sidebar: tutorials ``` ## Breadcrumbs From bfc2bbfc62b7217034acec12b127261fae1d7b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:20:26 +0200 Subject: [PATCH 2/3] chore: remove some words --- docs/websites/website-navigation.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/websites/website-navigation.qmd b/docs/websites/website-navigation.qmd index 32b2c71293..a60d6bd917 100644 --- a/docs/websites/website-navigation.qmd +++ b/docs/websites/website-navigation.qmd @@ -380,7 +380,7 @@ website: ``` 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. -For example, to include the tutorials sidebar, from the above example, on a page, add the following to the page's front matter: +For example, to include the tutorials sidebar on a page, add the following to the page's front matter: ```yaml sidebar: tutorials From 33bdc4eb4bfaa6034bf95faa1c6c619257022798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:14:15 +0100 Subject: [PATCH 3/3] refactor: move manual reuse of sidebar via ID sot side navigation --- docs/websites/website-navigation.qmd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/websites/website-navigation.qmd b/docs/websites/website-navigation.qmd index f868638478..a7cc822903 100644 --- a/docs/websites/website-navigation.qmd +++ b/docs/websites/website-navigation.qmd @@ -179,7 +179,14 @@ Here are all of the options available for side navigation: | `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). | | `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. | -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. +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. + +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. +For example, to include the tutorials sidebar on a page, add the following to the page's front matter: + +```yaml +sidebar: +``` 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). @@ -378,13 +385,6 @@ website: # navigation items ``` -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. -For example, to include the tutorials sidebar on a page, add the following to the page's front matter: - -```yaml -sidebar: tutorials -``` - ## Breadcrumbs By default, navigational breadcrumbs are displayed above the page title on each page that is nested deeper than one level in the sidebar navigation. For example, given this `sidebar` definition: