diff --git a/src/_data/books.js b/src/_data/books.js index 91891946..f99762de 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -1,14 +1,15 @@ const reading = require('./json/read.json') module.exports = async function () { - return reading.map(read => { - if (read.status === 'started') return { + const books = reading.map(read => { + return { title: read.title, - 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 + finished: read.dateFinished, + status: read.status, } }) + return books.filter(book => book.status === 'started') } diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 930cf604..30ae583b 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -119,16 +119,14 @@ layout: main