Correctly detect a global sidebar and not a specific page sidebar #9966
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a follow-up on #9741
Original Description
global sidebard is detected by
undefined
id, so we need to compute id from title not too early, and in a a way that does not modify initial configThis is currently a proposal built on top of unmerged #8871 by @dragonstyle to deal with #8869 and follow up on #5689
I believe we can do what was supposed to be done in #8871, but we need to make sure that we don't modify initial
navigation.sidebars
content's id.I still think we could consider adding a more explicit
global
config fortrue
orfalse
to make this more clear.This requires some testing to be sure it works ok this time. Opening this draft PR to discuss and have thoughts on this change.
New consideration
This PR broke complex website like Quarto web. So this type of change needs to be tested against very complex usage of sidebar.
So the implicit global sidebar detection is still not working - maybe adding a new global config kye is better than considering id to be undefined as a global sidebar.
Opening as a draft to remember work done, and try again later.
TO DO
global: true
key in sidebar per sidebar with single sidebar entry gets shown across entire website #5689 (comment)