fix: og data

This commit is contained in:
Cory Dransfeldt 2024-05-23 18:24:05 -07:00
parent 2590fa9e64
commit ef5592ab42
No known key found for this signature in database
3 changed files with 10 additions and 4 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "17.0.2", "version": "17.0.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "17.0.2", "version": "17.0.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/api-text": "^1.2.2", "@cdransf/api-text": "^1.2.2",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "17.0.2", "version": "17.0.3",
"description": "The source for my personal site. Built using 11ty.", "description": "The source for my personal site. Built using 11ty.",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -4,11 +4,13 @@
{{ title }} {{ title }}
{% elsif title %} {% elsif title %}
{{ title }} • {{ meta.siteName }} {{ title }} • {{ meta.siteName }}
{% elsif artist.name_string %}
Artists • {{ artist.name_string }} • {{ meta.siteName }}
{% elsif book.title %} {% elsif book.title %}
Books • {{ book.title }} • {{ meta.siteName }} Books • {{ book.title }} • {{ meta.siteName }}
{% elsif movie.title %} {% elsif movie.title %}
Movies • {{ movie.title }}{% if movie.rating %} ({{ movie.rating }}){% endif %} • {{ meta.siteName }} Movies • {{ movie.title }}{% if movie.rating %} ({{ movie.rating }}){% endif %} • {{ meta.siteName }}
{% elsif movie.title %} {% elsif show.title %}
Shows • {{ show.title }} • {{ meta.siteName }} Shows • {{ show.title }} • {{ meta.siteName }}
{% else %} {% else %}
{{ meta.siteName }} {{ meta.siteName }}
@ -17,6 +19,8 @@
{%- capture pageDescription -%} {%- capture pageDescription -%}
{%- if schema == 'blog' -%} {%- if schema == 'blog' -%}
{{ post_excerpt | markdown | strip_html }} {{ post_excerpt | markdown | strip_html }}
{% elsif artist.description %}
{{ artist.description | truncate: 300 }}
{% elsif book.description %} {% elsif book.description %}
{{ book.description }} {{ book.description }}
{% elsif movie.description %} {% elsif movie.description %}
@ -34,6 +38,8 @@
{{ meta.url }}/assets/img/ogi/{{ title | slugifyString }}-preview.png {{ meta.url }}/assets/img/ogi/{{ title | slugifyString }}-preview.png
{%- elsif schema == 'music' -%} {%- elsif schema == 'music' -%}
{{ music.recent.artists[0].image }} {{ music.recent.artists[0].image }}
{%- elsif schema == 'artist' -%}
{{ artist.image }}
{%- elsif schema == 'watching' -%} {%- elsif schema == 'watching' -%}
{%- assign featuredMovie = movies.recentlyWatched | first -%} {%- assign featuredMovie = movies.recentlyWatched | first -%}
{{ featuredMovie.backdrop }} {{ featuredMovie.backdrop }}