Skip to content

Commit

Permalink
anew
Browse files Browse the repository at this point in the history
  • Loading branch information
utksi committed Jan 16, 2025
1 parent 2132a02 commit a23f907
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _scripts/search.liquid.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ninja = document.querySelector('ninja-keys');
// add the home and posts menu items
ninja.data = [
{%- for page in site.pages -%}
{%- if page.permalink == '/' -%}{%- assign about_title = page.title | strip -%}{%- endif -%}
{%- if page.permalink == '/' and page.nav != false -%}{%- assign about_title = page.title | strip -%}{%- endif -%}
{%- endfor -%}
{
id: "nav-{{ about_title | slugify }}",
Expand All @@ -20,7 +20,8 @@ ninja.data = [
{%- assign sorted_pages = site.pages | where:"nav",true | sort: "nav_order" -%}
// somehow this doesn't exclude nav: false pages {%- assign sorted_pages = site.pages | sort: "nav_order" -%}
{%- for p in sorted_pages -%}
{%- if p.nav and p.autogen == null -%}
{%- if p.autogen == null -%}
// since p.nav filter is already fulfilled with the 'where' conditions {%- if p.nav and p.autogen == null -%}
{%- if p.dropdown -%}
{%- for child in p.children -%}
{%- unless child.title == 'divider' -%}
Expand Down

0 comments on commit a23f907

Please sign in to comment.