diff --git a/src/_data/books.js b/src/_data/books.js index de3d3d94..1f86e342 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -25,8 +25,9 @@ module.exports = async function () { if (data[index]) data[index]['author'] = author.textContent }) doc.querySelectorAll('.md\\:block .book-cover img').forEach((image, index) => { - if (!data[index]) data.push({ image: image.src }) - if (data[index]) data[index]['image'] = image.src + const img = image.src.replace('https://cdn.thestorygraph.com', 'https://books.coryd.dev') + if (!data[index]) data.push({ image: img }) + if (data[index]) data[index]['image'] = img }) doc.querySelectorAll('.md\\:block .book-cover a').forEach((url, index) => { if (!data[index]) data.push({ url: `https://app.thestorygraph.com${url.href}` })