quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.89k stars 321 forks source link

Sidebar not displayed if no Quarto document #9242

Open mcanouil opened 6 months ago

mcanouil commented 6 months ago

The sidebar is not displayed if it does not include a Quarto document even-though there is content such as external links.

Sidebar displayedSidebar not displayed
````qmd project: type: website website: title: "Test" page-navigation: true navbar: left: - text: "External working" href: "https://quarto.org" target: "_blank" sidebar: - title: "Dropdown" contents: - text: "External working" href: "https://quarto.org" target: "_blank" - index.qmd format: html: default ```` ````qmd project: type: website website: title: "Test" page-navigation: true navbar: left: - text: "External working" href: "https://quarto.org" target: "_blank" sidebar: - title: "Dropdown" contents: - text: "External working" href: "https://quarto.org" target: "_blank" format: html: default ````

Originally posted by @mcanouil in https://github.com/quarto-dev/quarto-cli/issues/9153#issuecomment-2029528267

cderv commented 5 months ago

I wonder if this is related to

which seems to not have been fixed by

All related to change for https://github.com/quarto-dev/quarto-cli/issues/5689 regarding sidebar and id (as a sidebar with a Title will have automatically an id assigned

Reminder: the breaking change in 1.4 was a sidebar with an id will only apply to the page related and not act as a global sidebar.

cderv commented 5 months ago

https://github.com/quarto-dev/quarto-cli/blob/6bf654a79f3efe237fa81f98b37e6c2699f22059/src/project/types/website/website-navigation.ts#L1006-L1009

When there is title, we assign an id

But then we consider that a sidebar with an id is no more a global sidebar and we apply only on containtain href...

https://github.com/quarto-dev/quarto-cli/blob/6bf654a79f3efe237fa81f98b37e6c2699f22059/src/project/types/website/website-shared.ts#L344-L368

but here there is none, so the sidebar never applies

Two things here:

I wonder if we should reconsider some thoughts from @dragonstyle at

cderv commented 5 months ago

The problem is :

So I really think we should rethink change for

cderv commented 4 months ago

The fix is breaking complex website so this needs so something is off. I am reopening and deal with this differently with more checks