Skip to content

Commit 28bfc55

Browse files
authored
Merge pull request #11339 from quarto-dev/navbar/search-opt-out
2 parents 2a83abb + bc27289 commit 28bfc55

File tree

14 files changed

+121
-16
lines changed

14 files changed

+121
-16
lines changed

news/changelog-1.6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ All changes included in 1.6:
104104
- ([#10567](https://github.com/quarto-dev/quarto-cli/issues/10567)): Generate breadcrumbs correctly for documents using a level-1 heading as the title.
105105
- ([#10616](https://github.com/quarto-dev/quarto-cli/issues/10268)): Add a `z-index` setting to the 'back to top' button to ensure it is always visible.
106106
- ([#10864](https://github.com/quarto-dev/quarto-cli/issues/10864)): Support detection of `og:image:alt` attribute from auto-discovered images.
107+
- ([#9905](https://github.com/quarto-dev/quarto-cli/issues/9905)): Setting `search: false` in `navbar` config for `website` in `_quarto.yml` correctly opt-out sidebar.
107108

108109
### Quarto Blog
109110

src/project/types/website/website-navigation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,9 @@ async function navbarEjsData(
12321232
const searchOpts = await searchOptions(project);
12331233
const data: Navbar = {
12341234
...navbar,
1235-
search: searchOpts && searchOpts.location === "navbar"
1235+
search: navbar.search !== undefined
1236+
? navbar.search
1237+
: searchOpts && searchOpts.location === "navbar"
12361238
? searchOpts.type
12371239
: false,
12381240
background: navbar.background || "primary",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.quarto/
2+
_site/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
project:
2+
type: website
3+
4+
website:
5+
title: "search opt out"
6+
search:
7+
location: sidebar
8+
navbar:
9+
search: false
10+
left:
11+
- href: index.qmd
12+
text: Home
13+
14+
format: html
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "search opt out"
3+
---
4+
5+
This is a Quarto website.
6+
7+
To learn more about Quarto websites visit <https://quarto.org/docs/websites>.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
project:
2+
type: website
3+
4+
website:
5+
title: "search opt out"
6+
search:
7+
location: sidebar
8+
sidebar:
9+
search: false
10+
contents:
11+
- section: "Basics"
12+
contents:
13+
- index.qmd
14+
15+
format: html
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "search opt out"
3+
---
4+
5+
This is a Quarto website.
6+
7+
To learn more about Quarto websites visit <https://quarto.org/docs/websites>.

tests/smoke/extensions/install.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ for (const extUrl of extUrls) {
9898
Deno.removeSync("_extensions", { recursive: true });
9999
return Promise.resolve();
100100
},
101-
santize: {
101+
sanitize: {
102102
resources: false,
103103
},
104104
},

0 commit comments

Comments
 (0)