diff --git a/_layouts/sidebar.html b/_layouts/sidebar.html index feffca8cc2..615fd2c6b7 100644 --- a/_layouts/sidebar.html +++ b/_layouts/sidebar.html @@ -6,27 +6,30 @@ layout: default
- {% for group in toplevels %} - {% assign frontdoc=group.docs| where_exp: "doc","doc.path == group.frontpage"|first %} + {% for collection in toplevels %} + {% assign frontdoc = collection.docs | where_exp: "doc","doc.path == collection.frontpage" | first %} {% unless frontdoc %} - {% assign frontdoc=group.docs[0] %} - {% endunless %} + {% assign frontdoc = collection.docs[0] %} + {% endunless %} {% capture target %}{% include link.html url=frontdoc.url %}{% endcapture %}
- {{ group.caption }} - {% if page.collection == group.label %} - {% assign subpages = group.docs | sort_natural:"title" | sort:"sort_key" %} - {% for doc in subpages %} - {% assign classmodifier="" %} - {% if doc.url == page.url %} - {% assign classmodifier="disabled" %} - {% endif %} - {% capture target %}{% include link.html url=doc.url %}{% endcapture %} - {% include title.html doc=doc coll=group %} + {{ collection.caption }} + {% if page.collection == collection.label %} + {% assign docs_by_sort_key = collection.docs | group_by:"sort_key" | sort:"name", "last" %} + {% for group in docs_by_sort_key %} + {% assign docs_sorted = group.items | sort:"title" %} + {% for doc in docs_sorted %} + {% assign classmodifier="" %} + {% if doc.url == page.url %} + {% assign classmodifier="disabled" %} + {% endif %} + {% capture target %}{% include link.html url=doc.url %}{% endcapture %} + {% include title.html doc=doc coll=collection %} + {% endfor %} {% endfor %} {% endif %}
- {% endfor %} + {% endfor %}
{% if page.title %}