Skip to content

Commit f464f34

Browse files
committed
Skip logo normalization for sidebars without explicit logo
Preserve inheritance: sidebars that don't define logo should inherit from the first sidebar via propagation spread. Add changelog entry and test coverage for the inheritance case.
1 parent f9439fb commit f464f34

4 files changed

Lines changed: 24 additions & 0 deletions

File tree

news/changelog-1.10.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ All changes included in 1.10:
1313

1414
- ([#14261](https://github.com/quarto-dev/quarto-cli/issues/14261)): Fix theorem/example block titles containing inline code producing invalid Typst markup when syntax highlighting is applied.
1515

16+
## Projects
17+
18+
### Websites
19+
20+
- ([#13565](https://github.com/quarto-dev/quarto-cli/issues/13565), [#14353](https://github.com/quarto-dev/quarto-cli/issues/14353)): Fix sidebar logo not appearing on secondary sidebars in multi-sidebar website layouts.
21+
1622
## Commands
1723

1824
### `quarto preview`

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export async function websiteNavigationConfig(project: ProjectContext) {
172172
}
173173

174174
for (const sb of sidebars) {
175+
if (sb.logo === undefined) continue; // let propagation handle inheritance
175176
let sideLogo = sb.logo;
176177
if (sideLogo !== false) { // don't do anything logo processing when sidebar logo is opt-out
177178
if (sideLogo && sb[kLogoAlt]) {

tests/docs/smoke-all/website-sidebar/issue-14353-multi-sidebar-logo/_quarto.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ project:
55
render:
66
- index.qmd
77
- page.qmd
8+
- page2.qmd
89

910
website:
1011
title: "Issue 14353"
@@ -19,6 +20,10 @@ website:
1920
contents:
2021
- page.qmd
2122

23+
- title: "Group 3"
24+
contents:
25+
- page2.qmd
26+
2227
format:
2328
html:
2429
theme: cosmo
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "Group 3 Page"
3+
_quarto:
4+
tests:
5+
html:
6+
ensureHtmlElements:
7+
-
8+
- 'a.sidebar-logo-link img[src$="logo-a.png"][class*="sidebar-logo"]'
9+
- []
10+
---
11+
12+
This page belongs to the third sidebar entry which has no explicit logo. It should inherit logo-a.png from the first sidebar.

0 commit comments

Comments
 (0)