-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbooks.njk
24 lines (21 loc) · 853 Bytes
/
books.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
layout: layouts/base.njk
title: "Lecciones de libros"
permalink: libros/
---
{% set postsList = collections.books %}
{% set postsListCount = collections.books | length %}
<h1 class="text-accent-500 dark:text-accent-dark-500 font-black text-3xl mb-8">Lecciones de libros 📚 ({{ postsListCount }} posts)</h1>
<section class="flex flex-col space-y-8 mb-8">
{% for date, posts in postsList | reverse | groupby("data.monthYear") %}
<details {% if loop.first or loop.index0 === 1 %} open {% endif %} class="">
<summary class="cursor-pointer">
{{ date | capitalize }} ({{ posts | length }} posts)
</summary>
{# asyncEach because, bugs. https://github.com/11ty/eleventy-img/issues/81 #}
{% asyncEach post in posts %}
{% include "bookitem.njk" %}
{% endeach %}
</details>
{% endfor %}
</section>