Open mcanouil opened 3 weeks ago
So the aim is to control the search box inclusion at the navbar or sidebar level and not at the top level website.search
?
This is the issue here, is this correct understanding ?
Possibly, at least the documentation implies that it is possible. If you cannot disable at the navbar
level, then it's odd to have search: true
(if it can take true
, I expect false
to be valid) and the below description in the documentation.
Include a search box (true or false). Note that if there is already a search box on the top navigation bar it won’t be displayed on the sidebar.
Source: https://quarto.org/docs/websites/website-navigation.html#side-navigation
The main issue to me is that if you want to disable search, from the documentation, it is very likely, a user will try:
website:
navbar:
search: false
It seems there is indeed a difference in processing
So in the former, if sidebar.search
is set to false, it deactive search , and global setting is ignored
For the latter, the value of navbar.search
does not seem important at all.
I believe it has been lost here: https://github.com/quarto-dev/quarto-cli/commit/0b86f2219857df6e657eda3a62581e48276c8de7#diff-2399e32434824d82d99e49170925185608bab491654180e0426afae839d61ef0L764
Previously, the navbar.search
was the way to activate it, before the website.search.location
was implemented.
And the exact same issue has been fixed for sidebar.search
in there: 0ba4ad1ae1e6831a68d79db9737966b6fb5de7f6
So probably we should do the same for navbar.
It's not possible to disable the search button/bar when in its default location, namely
navbar
.The search will still appear on the right of the navbar.
As a comparison, the same for sidebar works as expected:
Originally posted by @mcanouil in https://github.com/quarto-dev/quarto-cli/discussions/9836#discussioncomment-9692676