feat: support book reviews

This commit is contained in:
Cory Dransfeldt 2024-06-02 14:00:39 -07:00
parent abb4ba37f3
commit 80d222cdbc
No known key found for this signature in database
5 changed files with 7 additions and 5 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "coryd.dev",
"version": "18.4.4",
"version": "18.5.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
"version": "18.4.4",
"version": "18.5.4",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.4.0",

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "18.4.4",
"version": "18.5.4",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {

View file

@ -63,6 +63,8 @@ export default async function () {
return {
title: book['title'],
author,
review: book['review'],
rating: book['star_rating'] !== 'unrated' ? book['star_rating'] : '',
description: book['description'],
image: book['thumbnail'],
url: `/books/${book['isbn']}`,
@ -70,7 +72,6 @@ export default async function () {
status: book['read_status'],
progress: book['progress'],
tags: book['tags'],
rating: book['star_rating'] !== 'unrated' ? book['star_rating'] : '',
isbn: book['isbn'],
type: 'book',
}

View file

@ -48,5 +48,6 @@ schema: book
<p class="sub-meta"><a href="https://openlibrary.org/isbn/{{ book.isbn }}" title="View {{ book.title | escape }} on Open Library">View on Open Library</a></p>
</div>
</div>
{% if book.review %}{{ book.review | markdown }}{% endif %}
{% if book.description %}<p><em>{{ book.description }}</em></p>{% endif %}
</article>

View file

@ -39,7 +39,7 @@ schema: movie
</div>
{% if movie.review %}
{% render "partials/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<p>{{ movie.review | markdown }}</p>
{{ movie.review | markdown }}
<hr class="large-spacing" />
{% endif %}
{% if movie.description %}<p><em>{{ movie.description }}</em></p>{% endif %}