Skip to content

Resolve sidebar logo for all sidebars, not just the first#14355

Open
cderv wants to merge 4 commits intomainfrom
fix/issue-14353
Open

Resolve sidebar logo for all sidebars, not just the first#14355
cderv wants to merge 4 commits intomainfrom
fix/issue-14353

Conversation

@cderv
Copy link
Copy Markdown
Collaborator

@cderv cderv commented Apr 13, 2026

The logo resolution logic (resolveLogo + logoAddLeadingSlashes) only ran for sidebars[0]. Other sidebars kept raw string logo values, but the EJS template expects { light: { path }, dark: { path } } objects since the dark logo support was added in #12996 (v1.8.15). This caused empty <a class="sidebar-logo-link"> anchors with no <img> for any sidebar after the first.

Fix

Loop the resolution over all sidebar entries that explicitly define a logo so each sidebar's logo is properly transformed. Sidebars without a logo key still inherit the first sidebar's logo via the existing propagation spread. Sidebars with logo: false still opt out of displaying a logo.

Closes #14353, closes #13565

The logo resolution logic (resolveLogo + logoAddLeadingSlashes) only ran
for sidebars[0]. Other sidebars kept raw string logo values, but the EJS
template expects { light: { path }, dark: { path } } objects since the
dark logo support was added in #12996. This caused empty <a> anchors
with no <img> for any sidebar after the first.

Loop the resolution over all sidebar entries so each sidebar's logo is
properly transformed.
@cderv cderv marked this pull request as ready for review April 14, 2026 13:49
cderv and others added 3 commits April 14, 2026 16:20
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.
Only skip logo normalization for secondary sidebars (i > 0) so the
first sidebar still resolves brand logos via resolveLogo when no
explicit logo is set. Add brand-multi-sidebar test fixture verifying
brand logos render on both sidebars without explicit logo config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar logo omitted in multi-sidebar website in 1.9.37 Support setting sidebar logo in Hybrid navigation (when multiple sidebar)

1 participant