develop #221
4 changed files with 15 additions and 3 deletions
12
.eleventy.js
12
.eleventy.js
|
@ -62,6 +62,18 @@ module.exports = function (eleventyConfig) {
|
||||||
.length;
|
.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 {
|
return {
|
||||||
// Pre-process *.md files with: (default: `liquid`)
|
// Pre-process *.md files with: (default: `liquid`)
|
||||||
markdownTemplateEngine: "njk",
|
markdownTemplateEngine: "njk",
|
||||||
|
|
|
@ -18,15 +18,13 @@ layout: base.njk
|
||||||
<div class="tab-card">
|
<div class="tab-card">
|
||||||
<div class="title">{{ strings.article.seriesParts }}</div>
|
<div class="title">{{ strings.article.seriesParts }}</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
{%- for post in collections.all %}
|
{%- for post in collections.series[series] %}
|
||||||
{% if post.data.series == series %}
|
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<a href="{{ post.url | url }}"
|
<a href="{{ post.url | url }}"
|
||||||
class="list-group-item list-group-item-action{% if post.url == page.url %} fw-bold{% endif %}">
|
class="list-group-item list-group-item-action{% if post.url == page.url %} fw-bold{% endif %}">
|
||||||
{{ post.data.title }}
|
{{ post.data.title }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,7 @@ service: matrix
|
||||||
title: Werde Teil der Matrix - Matrix Teil 1
|
title: Werde Teil der Matrix - Matrix Teil 1
|
||||||
summary: Erfahre Schritt für Schritt, wie du deinen eigenen Matrix Account einrichten kannst.
|
summary: Erfahre Schritt für Schritt, wie du deinen eigenen Matrix Account einrichten kannst.
|
||||||
series: matrix-setup
|
series: matrix-setup
|
||||||
|
order: 1
|
||||||
tags:
|
tags:
|
||||||
- Tutorial
|
- Tutorial
|
||||||
- Matrix
|
- Matrix
|
||||||
|
|
|
@ -4,6 +4,7 @@ service: matrix
|
||||||
title: Sichere Chats mit Matrix – Matrix Teil 2
|
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.
|
summary: Erfahre, was es mit Ende-zu-Ende-Verschlüsselung und der Verifizierung von Kontakten auf sich hat.
|
||||||
series: matrix-setup
|
series: matrix-setup
|
||||||
|
order: 2
|
||||||
tags:
|
tags:
|
||||||
- Tutorial
|
- Tutorial
|
||||||
- Matrix
|
- Matrix
|
||||||
|
|
Loading…
Reference in a new issue