From b74b49f52d70756a7ad25e67dd36b3f3c7f4bae1 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 7 Jul 2023 13:55:46 -0700 Subject: [PATCH] chore: book date fixes --- src/_data/books.js | 1 + src/_includes/feeds/books.liquid | 2 +- src/feeds/books.liquid | 2 +- src/feeds/json/books.11ty.liquid | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/_data/books.js b/src/_data/books.js index fd5e103b..91891946 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -7,6 +7,7 @@ module.exports = async function () { author: read.authors.length > 1 ? read.authors.join(', ') : read.authors.pop(), cover: read.thumbnail.replace('https://books.google.com', 'https://books.coryd.dev'), link: `https://openlibrary.org/search?q=${read.isbn}`, + started: read.dateStarted, finished: read.dateFinished } }) diff --git a/src/_includes/feeds/books.liquid b/src/_includes/feeds/books.liquid index 32ac1776..a843ddd3 100644 --- a/src/_includes/feeds/books.liquid +++ b/src/_includes/feeds/books.liquid @@ -7,7 +7,7 @@ - {% block update %}{{ books[0].finished | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} + {% block update %}{{ book[0].started | date: "%Y-%m-%dT%H:%M:%S-08:00" }}{% endblock %} {{ site.url }} {{ site.name }} diff --git a/src/feeds/books.liquid b/src/feeds/books.liquid index effdf352..f2881243 100644 --- a/src/feeds/books.liquid +++ b/src/feeds/books.liquid @@ -11,7 +11,7 @@ permalink: /books.xml {{ book.title | escape }} - {{ book.finished | date: "%m.%d.%Y" }} + {{ book.started | date: "%m.%d.%Y" }} {{ book.link }} diff --git a/src/feeds/json/books.11ty.liquid b/src/feeds/json/books.11ty.liquid index 7ad6c935..babfaade 100644 --- a/src/feeds/json/books.11ty.liquid +++ b/src/feeds/json/books.11ty.liquid @@ -13,7 +13,7 @@ permalink: '/books.json' "title": "{{ book.title | escape }}", "url": "{{ book.link }}", "content_text": "", - "date_published": "{{ book.finished | date: "%Y-%m-%dT%H:%M:%S-08:00" }}" + "date_published": "{{ book.started | date: "%Y-%m-%dT%H:%M:%S-08:00" }}" }{% if not forloop.last %},{% endif %} {% endfor %} ]