-
Notifications
You must be signed in to change notification settings - Fork 409
Description
Opening after talking to @cscheid
This may be a bug or documentation issue, but consider this callout on the Webpage Nav docs:
A page that doesn’t appear in any
sidebarwill inherit and display the first sidebar without anidortitle- you can prevent the sidebar from showing on a page by settingsidebar: falsein its front matter.
This implied to me that the sidebar displayed on a page (unless otherwise set with sidebar in the header) would be:
- The sidebar in which it is an element
- If not an element in any sidebar, the first sidebar without a title (or id)
Here's an example that doesn't seem to follow these rules.
Consider this sidebar:
website:
sidebar:
- title: Research
contents:
- project-1.qmd
- project-2.qmd
- title: Teaching
contents:
- course-1.qmd
- course-2.qmd
- contents:
- index.qmd
- about.qmdI would expect that project-1.qmd would get the "Research" sidebar, and course-1.qmd to get the "Teaching" sidebar. Instead, they both get the last sidebar.
I've documented this example, and many others (some that almost work, some that don't) at: https://github.com/cwickham/sidebar-array?tab=readme-ov-file#sidebar-behavior