diff --git a/.eleventy.js b/.eleventy.js
index 984d7a9..a447475 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -62,6 +62,18 @@ module.exports = function (eleventyConfig) {
.length;
});
+ eleventyConfig.addCollection("series", function (collectionApi) {
+ return collectionApi.getAll()
+ .filter(p => p.data?.series)
+ .sort((p0, p1) => p0.data.order - p1.data.order)
+ .reduce((series, post) => {
+ series[post.data.series] = series[post.data.series] ?? [];
+ series[post.data.series].push(post);
+ console.log(series);
+ return series;
+ }, {});
+ });
+
return {
// Pre-process *.md files with: (default: `liquid`)
markdownTemplateEngine: "njk",
diff --git a/src/_includes/layouts/article.njk b/src/_includes/layouts/article.njk
index ef52841..f96629e 100644
--- a/src/_includes/layouts/article.njk
+++ b/src/_includes/layouts/article.njk
@@ -18,15 +18,13 @@ layout: base.njk
{{ strings.article.seriesParts }}
- {%- for post in collections.all %}
- {% if post.data.series == series %}
+ {%- for post in collections.series[series] %}
- {% endif %}
{%- endfor %}
diff --git a/src/de/services/matrix/setup/part-1.md b/src/de/services/matrix/setup/part-1.md
index 60bcc91..51a83d9 100644
--- a/src/de/services/matrix/setup/part-1.md
+++ b/src/de/services/matrix/setup/part-1.md
@@ -4,6 +4,7 @@ service: matrix
title: Werde Teil der Matrix - Matrix Teil 1
summary: Erfahre Schritt für Schritt, wie du deinen eigenen Matrix Account einrichten kannst.
series: matrix-setup
+order: 1
tags:
- Tutorial
- Matrix
diff --git a/src/de/services/matrix/setup/part-2.md b/src/de/services/matrix/setup/part-2.md
index 2ff36a9..9b563f6 100644
--- a/src/de/services/matrix/setup/part-2.md
+++ b/src/de/services/matrix/setup/part-2.md
@@ -4,6 +4,7 @@ service: matrix
title: Sichere Chats mit Matrix – Matrix Teil 2
summary: Erfahre, was es mit Ende-zu-Ende-Verschlüsselung und der Verifizierung von Kontakten auf sich hat.
series: matrix-setup
+order: 2
tags:
- Tutorial
- Matrix