merging _sidebar.yml with other sidebar options #330
-
I'm trying to merge the _sidebar.yml file appropriately with some other sidebar formatting information, but I cannot get it to work. If I add any options into the sidebar section of the _quarto.yml, the sidebar fails to show altogether. For example, I have this block of yaml in my _quarto.yml and the sidebar does not appear. # tell quarto to read the generated sidebar
metadata-files:
- _sidebar.yml
website:
title: "documentation"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd
- href: reference/index.qmd
text: API Reference
sidebar:
style: floating If I remove the last bit, then the sidebar appears, but only on the reference documentation, not the first page index.html. # tell quarto to read the generated sidebar
metadata-files:
- _sidebar.yml
website:
title: "documentation"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd
- href: reference/index.qmd
text: API Reference the _sidebar.yml looks like this: website:
sidebar:
- contents:
- reference/index.qmd
- contents:
- reference/file1.qmd
- reference/file2.qmd
section: API
id: reference
- id: dummy-sidebar I asked a similar question on the quarto discussion and learned that the contents tag in the yaml should not be part of an array and should be an object, but it does sort of work. I'm trying to figure out if I'm using the output of quartodoc correctly or if there is something else I should do? I'd like to be able to style the sidebar and add other content to it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey, thanks for writing up this issue. What do you want the sidebar to look like across the site? If I'm understanding, you're hoping to...
|
Beta Was this translation helpful? Give feedback.
This should be possible now. For example, the quartodoc site has a sidebar for its Get Started Guide, and another for its API Reference. You should be able to add the sidebar for you other page (e.g. the Get Started Guide), and see the sidebar there.