summaryrefslogtreecommitdiff
path: root/source/_layouts
diff options
context:
space:
mode:
authorPrefetch2022-10-19 20:03:25 +0200
committerPrefetch2022-10-19 22:01:14 +0200
commite5b9bce79b68a68ddd2e51daa16d2fea73b84fdb (patch)
treef304894ace9d5da35f08127c4597485511b8a160 /source/_layouts
parent6ce0bb9a8f9fd7d169cbb414a9537d68c5290aae (diff)
Polish presentation, "fix" Unicode sorting
Diffstat (limited to 'source/_layouts')
-rw-r--r--source/_layouts/blog.html2
-rw-r--r--source/_layouts/category.html31
-rw-r--r--source/_layouts/concept.html8
3 files changed, 12 insertions, 29 deletions
diff --git a/source/_layouts/blog.html b/source/_layouts/blog.html
index 4049297..7a41ff9 100644
--- a/source/_layouts/blog.html
+++ b/source/_layouts/blog.html
@@ -2,7 +2,7 @@
layout: "default"
---
-<h1>{{ page.title }}</h1>
+<h1>{{ page.title | smartify }}</h1>
{{ content | toc_only }}
{{ content | inject_anchors }}
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 %}
diff --git a/source/_layouts/concept.html b/source/_layouts/concept.html
index 7a0849c..1523168 100644
--- a/source/_layouts/concept.html
+++ b/source/_layouts/concept.html
@@ -7,15 +7,15 @@ layout: "default"
Categories:
{% for category in categories %}
{% assign url = category | slugify %}
-<a href="/know/category/{{ url }}">{{ category }}</a>{% if forloop.last == false %},{% endif %}{% endfor %}.
+<a href="/know/category/{{ url }}">{{ category | smartify }}</a>{% if forloop.last == false %},{% endif %}{% endfor %}.
</p>
-<h1>{{ page.title }}</h1>
+<h1>{{ page.title | smartify }}</h1>
-{% capture markdown_after_katex %}
+{% capture content_after_katex %}
{% katexmm %}
{{ page.content }}
{% endkatexmm %}
{% endcapture %}
-{{ markdown_after_katex | markdownify }}
+{{ content_after_katex | markdownify }}