summaryrefslogtreecommitdiffstats
path: root/themes/problematic/layouts/partials/posts.html
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-07-19 11:13:28 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-07-19 11:13:28 +0100
commitf916fc4e7902308d1b499ed5f37d519446dbe7dd (patch)
tree6ec0c868c2271e47e11678250bd477899974d0d6 /themes/problematic/layouts/partials/posts.html
parent6808489f1bf0f653859bc46136d4b74bf7ce8570 (diff)
first implementation of blog posts sorted by category
Diffstat (limited to '')
-rw-r--r--themes/problematic/layouts/partials/posts.html22
1 files changed, 16 insertions, 6 deletions
diff --git a/themes/problematic/layouts/partials/posts.html b/themes/problematic/layouts/partials/posts.html
index 8ff3eb2..191f449 100644
--- a/themes/problematic/layouts/partials/posts.html
+++ b/themes/problematic/layouts/partials/posts.html
@@ -1,6 +1,16 @@
-<h3>Posts</h3>
-<ul id="posts">
-{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
- {{ .Render "li" }}
-{{- end }}
-</ul>
+<h2>Blog Posts</h2>
+
+{{ range $key, $value := .Site.Taxonomies.categories }}
+
+ <h3>{{ $key | title }}</h3>
+
+ <ul>
+
+ {{ range where site.RegularPages ".Params.categories" "intersect" (slice ($key |title)) }}
+ <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
+ {{ end }}
+
+ </ul>
+
+{{ end }}
+