diff --git a/config/mediaFilters.js b/config/mediaFilters.js index 38fd9c37..d21cc164 100644 --- a/config/mediaFilters.js +++ b/config/mediaFilters.js @@ -15,4 +15,7 @@ module.exports = { movie: (url, host, cdn) => { return url.replace(host, cdn).replace('600', '200').replace('900', '300') }, + book: (url, host, cdn) => { + return url.replace(host, cdn) + }, } diff --git a/src/_data/books.js b/src/_data/books.js index 2e0e7897..747b2246 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -6,7 +6,13 @@ module.exports = async function () { // noinspection JSCheckFunctionSignatures const asset = new AssetCache('books_data') if (asset.isCacheValid('1h')) return await asset.getCachedValue() - const res = await extract(url) + const res = await extract(url, { + getExtraEntryFields: (feedEntry) => { + return { + image: feedEntry['oku:cover'] || 'https://cdn.coryd.dev/books/missing-book.jpg', + } + }, + }) .catch((error) => { console.log(error.message) }) diff --git a/src/_data/site.json b/src/_data/site.json index 0de58a56..a537f112 100644 --- a/src/_data/site.json +++ b/src/_data/site.json @@ -13,8 +13,10 @@ "instapaper": "https://www.instapaper.com/p/coryd", "letterboxd": "https://letterboxd.com/cdme", "letterboxd-host": "https://a.ltrbxd.com", + "oku-host": "https://oku.ams3.cdn.digitaloceanspaces.com", "trakt": "https://trakt.tv/users/cdransf", "oku": "https://oku.club/user/cory", "coffee": "https://www.buymeacoffee.com/cory", - "cdn-movies": "https://movies.coryd.dev" + "cdn-movies": "https://movies.coryd.dev", + "cdn-books": "https://books.coryd.dev" } diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 6faa17df..51e2895b 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -39,117 +39,113 @@ layout: main Assembling lists of ad and tracker-blocking tools.
- {% if books.size > 0 %} -