Repository navigation
Sidebar: match section items by sbSecId, so sections can be reordered - #6909
Merged
Merged
Conversation
left_nav.html looked up each section's items with the section's loop index, so reordering sections in sidebar.yml meant renumbering sbSecId and every page's sidebarType. Use the header's own sbSecId instead. Every header's sbSecId equals its position today, so the rendered sidebar is unchanged. Document how the sidebar is wired in README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for prebid-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
muuki88
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #5630.
Why
#5630 notes that the sidebar is tedious to update, because a page's
sidebarTypehas to line up with the sections in_data/sidebar.yml. The cause is in_includes/left_nav.html: it finds each section's items withwhere: "sbSecId", forloop.index0, i.e. the section's position. Moving a section insidebar.ymltherefore meant renumberingsbSecIdon its entries andsidebarTypeon every page in it.Change
left_nav.htmlmatches by ID: items are now selected with the header's ownsbSecId. The highlighted-section check already used it.sbSecIdbecomes a stable ID, so reordering sections means moving their blocks insidebar.yml, with no page changes.sbSecIdequal to their position (0 = Overview … 10 = Prebid Agents), and no sidebar entry points at a missing section, so the output is the same.sbSecIdandsidebarTypefit together.#5630
Together with #6851 (release notes nav, PBS-Java release notes, header bidding expert pages, Prebid.js 11 cleanup), #6907 (bidder pages using renamed modules) and #6908 (GPID page), this covers the items listed on #5630 and its follow-up list.
Testing
The rendered sidebar on this PR's Netlify preview is identical to #6907's preview, which is built from master without this change, on six pages in different sections: Prebid.js (
getting-started), Prebid Server (prebid-server-overview), a bidder page (msft), Prebid Mobile, Tools (professor-prebid) and Support (release-notes). Comparing with production instead shows only Netlify's link rewriting (/x.htmlbecomes/x), not changes from this PR.🤖 Generated with Claude Code