chore: programmatically generate book year links on index

This commit is contained in:
Cory Dransfeldt 2024-07-15 19:36:13 -07:00
parent 98df43710d
commit 2420479402
No known key found for this signature in database
4 changed files with 8 additions and 4 deletions

View file

@ -10,7 +10,7 @@ schema: books
{%- assign currentBookCount = books.all | currentBookCount -%}
<h2 class="page-header">Currently reading</h2>
<p>Here's what I'm reading at the moment. I've finished <strong class="highlight-text">{{ currentBookCount }} books</strong> this year.</p>
<p><a href="/books/years/2024">2024</a> / <a href="/books/years/2023">2023</a> / <a href="/books/years/2022">2022</a> / <a href="/books/years/2021">2021</a> / <a href="/books/years/2020">2020</a></p>
<p>{{ books.years | bookYearLinks }}</p>
{% render "partials/blocks/banners/rss.liquid", url: "https://feedpress.me/coryd-books", text: "Subscribe to my books feed or follow along on this page" %}
<hr />
{% for book in bookData %}