From 757acae2fabfec21c6e51e8959a195547aa92c5d Mon Sep 17 00:00:00 2001 From: Adam Schmideg Date: Wed, 20 Feb 2019 09:46:22 +0100 Subject: [PATCH] sort sidebar groups --- _config.yml | 10 +++++----- _layouts/sidebar.html | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/_config.yml b/_config.yml index 3d8515842f..27791b864c 100644 --- a/_config.yml +++ b/_config.yml @@ -19,20 +19,20 @@ collections: install-and-build: output: true caption: Install and build - sidebar: true + sidebar_index: 1 how-to: output: true caption: How to use - sidebar: true + sidebar_index: 2 interface: output: true caption: Interface documentation - sidebar: true + sidebar_index: 3 support: output: true caption: Issues and support - sidebar: true + sidebar_index: 4 developers: output: true caption: Developers - sidebar: true + sidebar_index: 5 diff --git a/_layouts/sidebar.html b/_layouts/sidebar.html index 072703079f..e0291eda83 100644 --- a/_layouts/sidebar.html +++ b/_layouts/sidebar.html @@ -4,8 +4,9 @@ layout: default
- {% for coll in site.collections %} - {% if coll.sidebar %} + {% assign collections = site.collections | sort: "sidebar_index" %} + {% for coll in collections %} + {% if coll.sidebar_index %}
{{ coll.caption }} {% for doc in coll.docs %}