diff --git a/package-lock.json b/package-lock.json index 3739b017..96f91ecd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "16.0.3", + "version": "16.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "16.0.3", + "version": "16.1.0", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.2.2", diff --git a/package.json b/package.json index 881d6df5..e04f0603 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "16.0.3", + "version": "16.1.0", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": { diff --git a/src/_data/books.js b/src/_data/books.js index 6b00263c..12a71918 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -16,7 +16,7 @@ export default async function () { title: book['title'], authors, description: book['description'], - image: encodeURIComponent(book['thumbnail'].replace('&edge=curl', '')), + image: book['thumbnail'], url: `https://openlibrary.org/isbn/${book['isbn']}`, date, status: book['status'], diff --git a/src/_includes/base.liquid b/src/_includes/base.liquid index 2f9b60a9..2c0a93b9 100644 --- a/src/_includes/base.liquid +++ b/src/_includes/base.liquid @@ -8,6 +8,21 @@ {{ meta.siteName }} {% endif %} {%- endcapture -%} +{%- capture ogImage -%} + {% if schema == 'blog' %} + {{ meta.url }}/assets/img/ogi/{{ title | slugifyString }}-preview.png + {% elsif schema == 'music' %} + {{ music.recent.artists[0].image }} + {% elsif schema == 'watching' %} + {%- assign featuredMovie = movies.recentlyWatched | first -%} + {{ featuredMovie.backdrop }} + {% elsif schema == 'books' %} + {%- assign featuredBook = books | bookStatus: 'started' | reverse | first -%} + {{ featuredBook.image }} + {% else %} + {{ meta.meta_data.opengraph_default }} +{% endif %} +{%- endcapture -%}
@@ -23,10 +38,7 @@ - + @@ -111,4 +123,4 @@ {{ content }} - +