1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-21 23:46:59 -05:00

Update _includes/nav.html

Co-Authored-By: Patrick Marsceill <pmarsceill@users.noreply.github.com>
This commit is contained in:
Peter Mosses 2020-04-28 17:08:53 +02:00 committed by GitHub
parent 41a74d247d
commit 73ad860f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,12 +2,12 @@
<ul class="navigation-list">
{%- assign ordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order != nil" -%}
{%- assign unordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order == nil" -%}
{%- if site.nav_sort == 'case_sensitive' -%}
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
{%- else -%}
{%- if site.nav_sort == 'case_insensitive' -%}
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
{%- else -%}
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
{%- endif -%}
{%- assign pages_list = sorted_ordered_pages_list | concat: sorted_unordered_pages_list -%}
{%- for node in pages_list -%}