Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ This means an adaptor is not available to download from Prebid.org as soon as th

<a name="thanks"></a>

## Sidebar

The left navigation comes from `_data/sidebar.yml`. Each top-level section is an entry with `isSectionHeader: 1` and an `sbSecId`; its pages are the entries with the same `sbSecId`. A page's `sidebarType` front matter names the section that opens when you're on it.

`sbSecId` is an ID, not a position: to reorder sections, move their blocks in `sidebar.yml`. Pages don't need to change. A new section needs an unused `sbSecId`.

## Liquid Templating

* [jekyll - check for non empty](https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/jekyll/liquid/conditionals/non-empty.html)
Expand Down
4 changes: 2 additions & 2 deletions _includes/left_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<span class="menu-collapsed pb-sidebar-section pb-section-title">{{sectionHeader.sectionTitle}}</span>
</a>

{% assign sectionIdx = forloop.index0 %}
{% assign arrSectionItems = site.data.sidebar | where: "sbSecId", sectionIdx %}
{% comment %} Match items by the section's own sbSecId, not its position, so sections can be reordered in sidebar.yml without renumbering pages. {% endcomment %}
{% assign arrSectionItems = site.data.sidebar | where: "sbSecId", sectionHeader.sbSecId %}

<!--get all sub section headers-->
{% assign arrSectionHeaders = arrSectionItems | where: "isHeader", "1" %}
Expand Down
Loading