summaryrefslogtreecommitdiff
path: root/source/_layouts
diff options
context:
space:
mode:
authorPrefetch2022-10-14 23:25:28 +0200
committerPrefetch2022-10-14 23:25:28 +0200
commit6ce0bb9a8f9fd7d169cbb414a9537d68c5290aae (patch)
treea0abb6b22f77c0e84ed38277d14662412ce14f39 /source/_layouts
Initial commit after migration from Hugo
Diffstat (limited to 'source/_layouts')
-rw-r--r--source/_layouts/blog.html8
-rw-r--r--source/_layouts/category.html34
-rw-r--r--source/_layouts/concept.html21
-rw-r--r--source/_layouts/default.html12
4 files changed, 75 insertions, 0 deletions
diff --git a/source/_layouts/blog.html b/source/_layouts/blog.html
new file mode 100644
index 0000000..4049297
--- /dev/null
+++ b/source/_layouts/blog.html
@@ -0,0 +1,8 @@
+---
+layout: "default"
+---
+
+<h1>{{ page.title }}</h1>
+
+{{ content | toc_only }}
+{{ content | inject_anchors }}
diff --git a/source/_layouts/category.html b/source/_layouts/category.html
new file mode 100644
index 0000000..8393bd6
--- /dev/null
+++ b/source/_layouts/category.html
@@ -0,0 +1,34 @@
+---
+layout: "default"
+---
+
+<h1>{{ page.title }}</h1>
+
+{% assign 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 %}
diff --git a/source/_layouts/concept.html b/source/_layouts/concept.html
new file mode 100644
index 0000000..7a0849c
--- /dev/null
+++ b/source/_layouts/concept.html
@@ -0,0 +1,21 @@
+---
+layout: "default"
+---
+
+<p>
+{% assign categories = page.categories | sort %}
+Categories:
+{% for category in categories %}
+{% assign url = category | slugify %}
+<a href="/know/category/{{ url }}">{{ category }}</a>{% if forloop.last == false %},{% endif %}{% endfor %}.
+</p>
+
+<h1>{{ page.title }}</h1>
+
+{% capture markdown_after_katex %}
+{% katexmm %}
+{{ page.content }}
+{% endkatexmm %}
+{% endcapture %}
+
+{{ markdown_after_katex | markdownify }}
diff --git a/source/_layouts/default.html b/source/_layouts/default.html
new file mode 100644
index 0000000..2f1cac2
--- /dev/null
+++ b/source/_layouts/default.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+{% include preamble.html %}
+<title>{{ page.title }} | {{ site.title }}</title>
+</head>
+<body>
+{% include navigation.html %}
+{{ content }}
+{% include footer.html %}
+</body>
+</html>