summaryrefslogtreecommitdiff
path: root/source/know/category
diff options
context:
space:
mode:
Diffstat (limited to 'source/know/category')
-rw-r--r--source/know/category/index.md25
1 files changed, 4 insertions, 21 deletions
diff --git a/source/know/category/index.md b/source/know/category/index.md
index 9952eba..2772a9f 100644
--- a/source/know/category/index.md
+++ b/source/know/category/index.md
@@ -6,28 +6,11 @@ layout: "default"
# List of categories
-{% assign by_letter = site.pages
+This is an alphabetical list of the categories in this knowledge base.
+
+{% assign pages_by_letter = site.pages
| where_exp: "item", "item.layout == 'category'"
| group_by_exp: "item", "item.title | truncate: 1, ''"
| sort: "name"
%}
-
-This is an alphabetical list of the categories in this knowledge base.
-
-<div style="text-align: center;">
-&hyphen;
-{% for letter in by_letter %}
-<a href="#{{ letter.name }}">{{ letter.name }}</a>
-&hyphen;
-{% endfor %}
-</div>
-
-{% for letter in by_letter %}
-<h2 id="{{ letter.name }}">{{ letter.name }}</h2>
-<ul>
- {% assign items = letter.items | sort: "title" %}
- {% for item in items %}
- <li><a href="{{ item.url }}">{{ item.title }}</a></li>
- {% endfor %}
-</ul>
-{% endfor %}
+{% include alphlist.html pages_by_letter = pages_by_letter %}