-
Notifications
You must be signed in to change notification settings - Fork 0
/
reading.html
38 lines (35 loc) · 1.02 KB
/
reading.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
layout: listing
title: Reading
---
{% assign finished_books = site.data.books | where_exp: 'book', 'book.date_finished != nil' | sort: "date_finished" |
reverse %}
{% assign finished_books_by_year = finished_books | group_by_exp:"book", "book.date_finished | date: '%Y'" %}
{% for year in finished_books_by_year %}
<h2 id="{{year.name}}">{{ year.name }}</h2>
<ul>
{% for book in year.items %}
<li>
{% if book.review_url %}
<a class="title" href="{{ site.baseurl }}{{ book.review_url }}">
{{ book.title }}
</a>
{% else %}
<div class="title">
{{ book.title}}
</div>
{% endif %}
<div class="authors">
{{ book.authors | join:", " }}
</div>
<time datetime="{{ book.date_finished | date_to_xmlschema }}">
{{ book.date_finished | date: "%Y-%m-%d" }}
</time>
<div class="rating">
{{ "★★★★★" | truncate: book.rating.mine, "" }}
</div>
</li>
{% endfor %}
</ul>
{% endfor %}
<span>({{ finished_books | size }} books total since Jan 2020)</span>