From 69d54e76d3057932dcd9f2f8b8bf881d2bb81c31 Mon Sep 17 00:00:00 2001 From: Jason Carrete Date: Sat, 19 Aug 2023 00:49:00 -0400 Subject: [PATCH] Sort methods in API sidebar --- _includes/apiSidebar.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_includes/apiSidebar.html b/_includes/apiSidebar.html index 8fd2ba04..754c90e7 100644 --- a/_includes/apiSidebar.html +++ b/_includes/apiSidebar.html @@ -19,6 +19,7 @@
+ {% assign items = "" %} {% for method in site.data.chai %} {% assign render = false %} {% assign name = false %} @@ -31,9 +32,13 @@ {% endif %} {% endfor %} {% if render %} - {{ name }} + {% capture items %}{{ items | append: ", " | append: name }}{% endcapture %} {% endif %} {% endfor %} + {% assign items = items | remove_first: ", " | split: ", " | sort_natural %} + {% for name in items %} + {{ name }} + {% endfor %}