feat: cdn cutover

This commit is contained in:
Cory Dransfeldt 2024-04-12 17:26:17 -07:00
parent 57bd614e5d
commit 979d895f33
No known key found for this signature in database
20 changed files with 43 additions and 67 deletions

View file

@ -36,10 +36,7 @@ export default async function () {
if (!data[i]) {
data.push({ title: titles[i]?.textContent })
data.push({ author: authors[i]?.textContent })
data.push({ image: images[i].src.replace(
'https://cdn.thestorygraph.com',
'https://cd-books.b-cdn.net'
),
data.push({ image: `https://coryd.dev/.netlify/images/?url=${images[i]?.src}&fit=cover&w=200&h=307`,
})
data.push({ url: `https://app.thestorygraph.com${urls[i].href}` })
data.push({ percentage: percentages[i]?.textContent })
@ -52,10 +49,7 @@ export default async function () {
if (data[i]) {
data[i]['title'] = titles[i]?.textContent
data[i]['author'] = authors[i]?.textContent
data[i]['image'] = images[i]?.src.replace(
'https://cdn.thestorygraph.com',
'https://cd-books.b-cdn.net'
),
data[i]['image'] = `https://coryd.dev/.netlify/images/?url=${images[i]?.src}&fit=cover&w=200&h=307`,
data[i]['url'] = `https://app.thestorygraph.com${urls[i]?.href}`
data[i]['percentage'] = percentages[i]?.textContent
data[i]['dateAdded'] = date