feat: associate books and artists
This commit is contained in:
parent
40ad47aacb
commit
fdf0ebf2ca
12 changed files with 97 additions and 28 deletions
|
@ -54,6 +54,25 @@ schema: book
|
|||
{{ book.review | markdown }}
|
||||
<hr />
|
||||
{% endif %}
|
||||
{%- if book.artists -%}
|
||||
{%- capture sectionTitle -%}
|
||||
{% if book.artists.size > 1 %}
|
||||
I listen to artists featured in this book!
|
||||
{% else %}
|
||||
I listen to the artist featured in this book!
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
<p id="artists" class="music flex-centered">
|
||||
{% tablericon "headphones" "Music" %}
|
||||
{{ sectionTitle }}
|
||||
</p>
|
||||
<ul>
|
||||
{% for artist in book.artists %}
|
||||
<li><a href="{{ artist.url }}">{{ artist.name }}</a>{%- if artist.total_plays > 0 -%}: <strong class="highlight-text">{{ artist.total_plays }} plays</strong>{%- endif -%}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr />
|
||||
{%- endif -%}
|
||||
{% if book.description %}
|
||||
<h3>Overview</h3>
|
||||
{{ book.description | markdown }}
|
||||
|
|
|
@ -11,7 +11,7 @@ schema: books
|
|||
<h2>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>{{ books.years | bookYearLinks }}</p>
|
||||
{% render "partials/blocks/banners/rss.liquid", url: "https://coryd.dev/feeds/books", text: "Subscribe to my books feed or follow along on this page" %}
|
||||
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/books", text: "Subscribe to my books feed or follow along on this page" %}
|
||||
<hr />
|
||||
{% for book in bookData %}
|
||||
{% capture alt %}{{ book.title }} by {{ book.authors }}{% endcapture %}
|
||||
|
|
Reference in a new issue