summaryrefslogtreecommitdiff
path: root/source/_layouts/category.html
diff options
context:
space:
mode:
Diffstat (limited to 'source/_layouts/category.html')
-rw-r--r--source/_layouts/category.html31
1 files changed, 7 insertions, 24 deletions
diff --git a/source/_layouts/category.html b/source/_layouts/category.html
index 8393bd6..872c06c 100644
--- a/source/_layouts/category.html
+++ b/source/_layouts/category.html
@@ -2,33 +2,16 @@
layout: "default"
---
-<h1>{{ page.title }}</h1>
+<h1>{{ page.title | smartify }}</h1>
-{% assign by_letter = site.pages
+<p>
+This is an alphabetical list of the concepts in this category.
+</p>
+
+{% assign pages_by_letter = site.pages
| where_exp: "item", "item.layout == 'concept'"
| where_exp: "item", "item.categories contains page.title"
| group_by_exp: "item", "item.title | truncate: 1, ''"
| sort: "name"
%}
-
-<p>
-This is an alphabetical list of the concepts in this category.
-</p>
-
-<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 %}