diff --git a/config/data/author-map.js b/config/data/author-map.js
index eefe0c27..9b649486 100644
--- a/config/data/author-map.js
+++ b/config/data/author-map.js
@@ -1,4 +1,5 @@
export default {
+ "https://keithjgrant.com": "Keith J. Grant",
"https://mxb.dev": "Max Böck",
"https://niclake.me": "Nic Lake",
"https://www.anildash.com": "Anil Dash",
diff --git a/package-lock.json b/package-lock.json
index 34a66a77..0477c08e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,9 +9,9 @@
"version": "17.4.11",
"license": "MIT",
"dependencies": {
- "@cdransf/api-text": "^1.2.3",
- "@cdransf/select-pagination": "^1.1.1",
- "@cdransf/theme-toggle": "^1.2.4",
+ "@cdransf/api-text": "^1.3.1",
+ "@cdransf/select-pagination": "^1.3.1",
+ "@cdransf/theme-toggle": "^1.3.1",
"@daviddarnes/mastodon-post": "^1.3.0",
"@zachleat/webcare-webshare": "^1.0.3",
"minisearch": "^6.3.0",
@@ -1109,9 +1109,9 @@
}
},
"node_modules/@cdransf/api-text": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@cdransf/api-text/-/api-text-1.2.3.tgz",
- "integrity": "sha512-yojV+sVvWR6ZXtHx/i9RXmJ5NtxSMYWnAg8y9S7djEEjT4QYA29lF8p+cmZqJHv9KIIhfhS+qOZ5u3R2icdFlg=="
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@cdransf/api-text/-/api-text-1.3.1.tgz",
+ "integrity": "sha512-Je7TpwpxcmV4H+ApKpX7pOaXFWPF9yPUUHluMXZTOgoKD61pYC4zq7Te/dd6rJyC2tFrVQ8i1XdazSBH+ACP7w=="
},
"node_modules/@cdransf/eleventy-plugin-tabler-icons": {
"version": "1.5.0",
@@ -1120,14 +1120,14 @@
"dev": true
},
"node_modules/@cdransf/select-pagination": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@cdransf/select-pagination/-/select-pagination-1.1.1.tgz",
- "integrity": "sha512-2GUQSQ++chkKgQYRAIYnj1ugLswMWTzjdDwRh/SsfX7PJpyI8Th9GjDEm0sKS1SyLCjkfj6Bl31f66AlD0cEKw=="
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@cdransf/select-pagination/-/select-pagination-1.3.1.tgz",
+ "integrity": "sha512-zwBWlX7V6SXlUe9TkJblZF44+2agHRCaCnG/v+Q2Bcgf2DhOQI4qiMOoNBsr09TpkKvQENOqwT2kOycszBcJtA=="
},
"node_modules/@cdransf/theme-toggle": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-1.2.4.tgz",
- "integrity": "sha512-t86sAxzbQI7A9LxKndkRVVH14Z+3Cwk2Rl3CclOjmk0xEwwDYa+yG4A4di5mboGoWJ7RMRYtiEiTgsK5QtYSew=="
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-1.3.1.tgz",
+ "integrity": "sha512-GmL7sDTiReW0CygnG5sJOW0hx9+yic2WRiWvWSNa7buTOskZ9zCG/lrtuMUxIQCDd5DIE2KR/xX8F6BSHIsCFA=="
},
"node_modules/@daviddarnes/mastodon-post": {
"version": "1.3.0",
diff --git a/package.json b/package.json
index 1f61665e..06c59e2f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coryd.dev",
- "version": "17.4.11",
+ "version": "17.5.0",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {
@@ -21,9 +21,9 @@
"author": "Cory Dransfeldt",
"license": "MIT",
"dependencies": {
- "@cdransf/api-text": "^1.2.3",
- "@cdransf/select-pagination": "^1.1.1",
- "@cdransf/theme-toggle": "^1.2.4",
+ "@cdransf/api-text": "^1.3.1",
+ "@cdransf/select-pagination": "^1.3.1",
+ "@cdransf/theme-toggle": "^1.3.1",
"@daviddarnes/mastodon-post": "^1.3.0",
"@zachleat/webcare-webshare": "^1.0.3",
"minisearch": "^6.3.0",
diff --git a/src/_includes/base.liquid b/src/_includes/base.liquid
index 30ddf568..6b24ad82 100644
--- a/src/_includes/base.liquid
+++ b/src/_includes/base.liquid
@@ -1,68 +1,68 @@
-{%- capture fullUrl -%}{{ meta.url }}{{ page.url }}{%- endcapture -%}
-{%- capture pageTitle -%}
- {%- if schema == 'blog' -%}
- {{ title }}
- {% elsif title %}
- {{ title }} • {{ meta.siteName }}
- {% elsif artist.name_string %}
- Artists • {{ artist.name_string }} • {{ meta.siteName }}
- {% elsif book.title %}
- Books • {{ book.title }} • {{ meta.siteName }}
- {% elsif movie.title %}
- Movies • {{ movie.title }}{% if movie.rating %} ({{ movie.rating }}){% endif %} • {{ meta.siteName }}
- {% elsif show.title %}
- Shows • {{ show.title }} • {{ meta.siteName }}
- {% elsif genre.name %}
- Music • {{ genre.name }} • {{ meta.siteName }}
- {% else %}
- {{ meta.siteName }}
+{%- assign fullUrl = meta.url | append: page.url -%}
+
+{%- assign pageTitle = meta.siteName -%}
+{%- if schema == 'blog' -%}
+ {%- assign pageTitle = title -%}
+{%- elsif title -%}
+ {%- assign pageTitle = title | append: ' • ' | append: meta.siteName -%}
+{%- elsif artist.name_string -%}
+ {%- assign pageTitle = 'Artists • ' | append: artist.name_string | append: ' • ' | append: meta.siteName -%}
+{%- elsif book.title -%}
+ {%- assign pageTitle = 'Books • ' | append: book.title | append: ' • ' | append: meta.siteName -%}
+{%- elsif movie.title -%}
+ {%- assign pageTitle = 'Movies • ' | append: movie.title -%}
+ {%- if movie.rating -%}
+ {%- assign pageTitle = pageTitle | append: ' (' | append: movie.rating | append: ')' -%}
{%- endif -%}
-{%- endcapture -%}
-{%- capture pageDescription -%}
- {%- if schema == 'blog' -%}
- {{ post_excerpt | markdown | strip_html }}
- {% elsif artist.description %}
- {{ artist.description | truncate: 300 }}
- {% elsif book.description %}
- {{ book.description }}
- {% elsif movie.description %}
- {% if movie.review %}{{ movie.review | truncate: 300 }}{% else %}{{ movie.description }}{% endif %}
- {% elsif show.description %}
- {% if show.review %}{{ show.review | truncate: 300 }}{% else %}{{ show.description }}{% endif %}
- {% elsif genre.description %}
- {{ genre.description | markdown | strip_html | truncate: 300 }}
- {% elsif description %}
- {{ description }}
- {% else %}
- {{ meta.siteDescription }}
- {%- 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 == 'artist' -%}
- {{ artist.image }}
- {%- elsif schema == 'watching' -%}
+ {%- assign pageTitle = pageTitle | append: ' • ' | append: meta.siteName -%}
+{%- elsif show.title -%}
+ {%- assign pageTitle = 'Shows • ' | append: show.title | append: ' • ' | append: meta.siteName -%}
+{%- elsif genre.name -%}
+ {%- assign pageTitle = 'Music • ' | append: genre.name | append: ' • ' | append: meta.siteName -%}
+{%- endif -%}
+
+{%- assign pageDescription = meta.siteDescription -%}
+{%- if schema == 'blog' -%}
+ {%- assign pageDescription = post_excerpt | markdown | strip_html -%}
+{%- elsif artist.description -%}
+ {%- assign pageDescription = artist.description | truncate: 300 -%}
+{%- elsif book.description -%}
+ {%- assign pageDescription = book.description -%}
+{%- elsif movie.description -%}
+ {%- assign pageDescription = movie.review | default: movie.description | truncate: 300 -%}
+{%- elsif show.description -%}
+ {%- assign pageDescription = show.review | default: show.description | truncate: 300 -%}
+{%- elsif genre.description -%}
+ {%- assign pageDescription = genre.description | markdown | strip_html | truncate: 300 -%}
+{%- elsif description -%}
+ {%- assign pageDescription = description -%}
+{%- endif -%}
+
+{%- assign ogImage = meta.meta_data.opengraph_default -%}
+{%- case schema -%}
+ {%- when 'blog' -%}
+ {%- assign ogImage = meta.url | append: '/assets/img/ogi/' | append: title | slugifyString | append: '-preview.png' -%}
+ {%- when 'music' -%}
+ {%- assign ogImage = music.recent.artists[0].image -%}
+ {%- when 'artist' -%}
+ {%- assign ogImage = artist.image -%}
+ {%- when 'watching' -%}
{%- assign featuredMovie = movies.recentlyWatched | first -%}
- {{ featuredMovie.backdrop }}
- {%- elsif schema == 'books' -%}
+ {%- assign ogImage = featuredMovie.backdrop -%}
+ {%- when 'books' -%}
{%- assign featuredBook = books | bookStatus: 'started' | reverse | first -%}
- {{ featuredBook.image }}
- {%- elsif schema == 'book' -%}
- {{ book.image }}
- {%- elsif schema == 'movie' -%}
- {{ movie.backdrop }}
- {%- elsif schema == 'show' -%}
- {{ meta.url }}/media/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg
- {%- elsif schema == 'genre' -%}
+ {%- assign ogImage = featuredBook.image -%}
+ {%- when 'book' -%}
+ {%- assign ogImage = book.image -%}
+ {%- when 'movie' -%}
+ {%- assign ogImage = movie.backdrop -%}
+ {%- when 'show' -%}
+ {%- assign ogImage = meta.url | append: '/media/shows/backdrops/backdrop-' | append: show.tmdb_id | append: '.jpg' -%}
+ {%- when 'genre' -%}
{%- assign genreArtist = genre.artists | shuffleArray | first -%}
- {{ genreArtist.image }}
- {%- else -%}
- {{ meta.meta_data.opengraph_default }}
- {%- endif -%}
-{%- endcapture -%}
+ {%- assign ogImage = genreArtist.image -%}
+{%- endcase -%}
+
@@ -95,51 +95,36 @@