Fixed dates in book-shelf (#3446)

Fixes #3443.

Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
George 2026-01-15 10:53:02 -03:00 committed by GitHub
parent cfed3b02f1
commit 2bbc8ad544
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,12 +7,12 @@ layout: page
{% assign collection = site[page.collection] %} {% assign collection = site[page.collection] %}
{% if collection and collection.size > 0 %} {% if collection and collection.size > 0 %}
{% for item in collection reversed %} {% for item in collection reversed %}
{% assign current_year = item.date | date: '%Y' %} {% assign current_year = item.started | date: '%Y' %}
{% if current_year != year %} {% if current_year != year %}
{% unless forloop.first %} {% unless forloop.first %}
</ul> </ul>
{% endunless %} {% endunless %}
<h1 id="y{{item.date | date: "%Y"}}"> <h1 id="y{{item.started | date: "%Y"}}">
<a href="{{ current_year | prepend: '/books/' | relative_url }}">{{ current_year }}</a> <a href="{{ current_year | prepend: '/books/' | relative_url }}">{{ current_year }}</a>
</h1> </h1>
<ul> <ul>