chore: cdn url in cms + og images

This commit is contained in:
Cory Dransfeldt 2024-10-13 10:35:48 -07:00
parent 35b56b75f2
commit c23ef6bd0d
No known key found for this signature in database
36 changed files with 102 additions and 101 deletions

4
package-lock.json generated
View file

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

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "1.0.7", "version": "1.0.8",
"description": "The source for my personal site. Built using 11ty (and other tools).", "description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -1,7 +1,7 @@
import { createClient } from '@supabase/supabase-js' import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = process.env['SUPABASE_URL'] const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env['SUPABASE_KEY'] const SUPABASE_KEY = process.env.SUPABASE_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
const fetchGlobals = async () => { const fetchGlobals = async () => {

View file

@ -47,44 +47,44 @@
{%- assign pageDescription = description -%} {%- assign pageDescription = description -%}
{%- endif -%} {%- endif -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: globals.avatar | append: "?class=w800" -%} {%- assign ogImage = globals.cdn_url | append: globals.avatar -%}
{%- case schema -%} {%- case schema -%}
{%- when 'music' -%} {%- when 'music' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: page.image -%} {%- assign ogImage = globals.cdn_url | append: page.image -%}
{%- when 'music-index' -%} {%- when 'music-index' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: music.week.artists[0].image -%} {%- assign ogImage = globals.cdn_url | append: music.week.artists[0].grid.image -%}
{%- when 'artist' -%} {%- when 'artist' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: artist.image -%} {%- assign ogImage = globals.cdn_url | append: artist.grid.image -%}
{%- when 'genre' -%} {%- when 'genre' -%}
{%- assign sortedGenreArtists = genre.artists | sortByPlaysDescending: "total_plays" -%} {%- assign sortedGenreArtists = genre.artists | sortByPlaysDescending: "total_plays" -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: sortedGenreArtists[0].image -%} {%- assign ogImage = globals.cdn_url | append: sortedGenreArtists[0].grid.image -%}
{%- when 'watching' -%} {%- when 'watching' -%}
{%- assign featuredMovie = movies.recentlyWatched | first -%} {%- assign featuredMovie = movies.recentlyWatched | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%} {%- assign ogImage = globals.cdn_url | append: featuredMovie.grid.backdrop -%}
{%- when 'watching-shows' -%} {%- when 'watching-shows' -%}
{%- assign featuredShow = tv.recentlyWatched | first -%} {%- assign featuredShow = tv.recentlyWatched | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredShow.backdrop -%} {%- assign ogImage = globals.cdn_url | append: featuredShow.grid.backdrop -%}
{%- when 'favorite-movies' -%} {%- when 'favorite-movies' -%}
{%- assign featuredMovie = movies.favorites| shuffleArray | first -%} {%- assign featuredMovie = movies.favorites| shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%} {%- assign ogImage = globals.cdn_url | append: featuredMovie.grid.backdrop -%}
{%- when 'favorite-shows' -%} {%- when 'favorite-shows' -%}
{%- assign featuredShow = tv.favorites | shuffleArray | first -%} {%- assign featuredShow = tv.favorites | shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredShow.backdrop -%} {%- assign ogImage = globals.cdn_url | append: featuredShow.grid.backdrop -%}
{%- when 'books' -%} {%- when 'books' -%}
{%- assign featuredBook = books.all | bookStatus: 'started' | reverse | first -%} {%- assign featuredBook = books.all | bookStatus: 'started' | reverse | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%} {%- assign ogImage = globals.cdn_url | append: featuredBook.grid.image -%}
{%- when 'books-year' -%} {%- when 'books-year' -%}
{%- assign featuredBook = books.all | bookStatus: 'finished' | bookFinishedYear: year.value | first -%} {%- assign featuredBook = books.all | bookStatus: 'finished' | bookFinishedYear: year.value | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%} {%- assign ogImage = globals.cdn_url | append: featuredBook.grid.image -%}
{%- when 'book' -%} {%- when 'book' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: book.image -%} {%- assign ogImage = globals.cdn_url | append: book.grid.image -%}
{%- when 'movie' -%} {%- when 'movie' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: movie.backdrop -%} {%- assign ogImage = globals.cdn_url | append: movie.grid.backdrop -%}
{%- when 'show' -%} {%- when 'show' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: show.backdrop -%} {%- assign ogImage = globals.cdn_url | append: show.grid.backdrop -%}
{%- when 'genre' -%} {%- when 'genre' -%}
{%- assign genreArtist = genre.artists | shuffleArray | first -%} {%- assign genreArtist = genre.artists | shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: genreArtist.image -%} {%- assign ogImage = globals.cdn_url | append: genreArtist.grid.image -%}
{%- endcase -%} {%- endcase -%}
<!doctype html> <!doctype html>
@ -107,9 +107,9 @@
<meta name="fediverse:creator" content="{{ globals.mastodon }}" /> <meta name="fediverse:creator" content="{{ globals.mastodon }}" />
<meta name="generator" content="Eleventy"> <meta name="generator" content="Eleventy">
<meta name="robots" content="noai, noimageai"> <meta name="robots" content="noai, noimageai">
<link href="https://cdn.coryd.dev{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}" rel="icon" sizes="any"> <link href="{{ globals.cdn_url }}{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}" rel="icon" sizes="any">
<link href="https://cdn.coryd.dev{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}&type=svg" rel="icon" type="image/svg+xml"> <link href="{{ globals.cdn_url }}{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}&type=svg" rel="icon" type="image/svg+xml">
<link href="https://cdn.coryd.dev{{ globals.avatar }}?class=w800&v={% appVersion %}" rel="apple-touch-icon"> <link href="{{ globals.cdn_url }}{{ globals.avatar }}?class=w800&v={% appVersion %}" rel="apple-touch-icon">
<link type="application/atom+xml" rel="alternate" title="Posts / {{ globals.site_name }}" href="https://coryd.dev/feeds/posts"> <link type="application/atom+xml" rel="alternate" title="Posts / {{ globals.site_name }}" href="https://coryd.dev/feeds/posts">
<link rel="alternate" href="https://coryd.dev/feeds/links" title="Links / {{ globals.site_name }}" type="application/rss+xml"> <link rel="alternate" href="https://coryd.dev/feeds/links" title="Links / {{ globals.site_name }}" type="application/rss+xml">
<link rel="alternate" href="https://coryd.dev/feeds/movies" title="Movies / {{ globals.site_name }}'s movies feed" type="application/rss+xml"> <link rel="alternate" href="https://coryd.dev/feeds/movies" title="Movies / {{ globals.site_name }}'s movies feed" type="application/rss+xml">

View file

@ -1,13 +1,13 @@
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ image }}?class=bannersm&type=webp 256w, {{ globals.cdn_url }}{{ image }}?class=bannersm&type=webp 256w,
https://cdn.coryd.dev{{ image }}?class=bannermd&type=webp 512w, {{ globals.cdn_url }}{{ image }}?class=bannermd&type=webp 512w,
https://cdn.coryd.dev{{ image }}?class=bannerbase&type=webp 1024w {{ globals.cdn_url }}{{ image }}?class=bannerbase&type=webp 1024w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px (max-width: 850px) 512px
1024px" 1024px"
src="https://cdn.coryd.dev{{ image }}?class=bannersm&type=webp" src="{{ globals.cdn_url }}{{ image }}?class=bannersm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
loading="lazy" loading="lazy"

View file

@ -8,7 +8,7 @@
{%- elsif block.type == 'rss_banner' -%} {%- elsif block.type == 'rss_banner' -%}
{% render "partials/blocks/banners/rss.liquid", url:block.url, text:block.text %} {% render "partials/blocks/banners/rss.liquid", url:block.url, text:block.text %}
{%- elsif block.type == 'hero' -%} {%- elsif block.type == 'hero' -%}
{% render "partials/blocks/hero.liquid", image:block.image, alt:block.alt %} {% render "partials/blocks/hero.liquid", globals:globals, image:block.image, alt:block.alt %}
{%- elsif block.type == 'markdown' -%} {%- elsif block.type == 'markdown' -%}
{{ block.text | markdown }} {{ block.text | markdown }}
{%- elsif block.type == 'divider' -%} {%- elsif block.type == 'divider' -%}

View file

@ -4,11 +4,11 @@
"home_page_url": "{{ globals.url }}", "home_page_url": "{{ globals.url }}",
"feed_url": "{{ permalink | absoluteUrl }}", "feed_url": "{{ permalink | absoluteUrl }}",
"description": "{{ globals.site_description }}", "description": "{{ globals.site_description }}",
"icon": "https://cdn.coryd.dev{{ globals.avatar }}?class=w200", "icon": "{{ globals.cdn_url }}{{ globals.avatar }}?class=w200",
"author": { "author": {
"name": "{{ globals.site_name }}", "name": "{{ globals.site_name }}",
"url": "{{ globals.url }}", "url": "{{ globals.url }}",
"avatar": "https://cdn.coryd.dev{{ globals.avatar }}?class=w200" "avatar": "{{ globals.cdn_url }}{{ globals.avatar }}?class=w200"
}, },
"items": [ "items": [
{%- assign entries = data -%} {%- assign entries = data -%}

View file

@ -11,7 +11,7 @@
<image> <image>
<title><![CDATA[{{ title }}]]></title> <title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl }}</link> <link>{{ permalink | absoluteUrl }}</link>
<url>{{ "https://cdn.coryd.dev" | append: globals.avatar | append: "?class=w200" }}</url> <url>{{ globals.cdn_url }}{{ globals.avatar }}?class=w200</url>
<width>144</width> <width>144</width>
<height>144</height> <height>144</height>
</image> </image>
@ -34,7 +34,7 @@
<pubDate>{{ entryFeed.date | stringToRFC822Date }}</pubDate> <pubDate>{{ entryFeed.date | stringToRFC822Date }}</pubDate>
<guid isPermaLink="false">{{ entryFeed.url | encodeAmp }}</guid> <guid isPermaLink="false">{{ entryFeed.url | encodeAmp }}</guid>
{%- if entryFeed.image -%} {%- if entryFeed.image -%}
<enclosure url="https://cdn.coryd.dev{{ entryFeed.image }}?class=w800" type="image/jpeg" /> <enclosure url="{{ globals.cdn_url }}{{ entryFeed.image }}?class=w800&type=jpg" type="image/jpeg" />
{%- endif -%} {%- endif -%}
<description><![CDATA[{{ entryFeed.description | markdown }}]]></description> <description><![CDATA[{{ entryFeed.description | markdown }}]]></description>
</item> </item>

View file

@ -11,7 +11,7 @@
<image> <image>
<title><![CDATA[{{ title }}]]></title> <title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl }}</link> <link>{{ permalink | absoluteUrl }}</link>
<url>{{ "https://cdn.coryd.dev" | append: globals.avatar | append: "?class=w200" }}</url> <url>{{ globals.cdn_url }}{{ globals.avatar }}?class=w200</url>
<width>144</width> <width>144</width>
<height>144</height> <height>144</height>
</image> </image>

View file

@ -13,11 +13,11 @@
{%- if shape == 'poster' -%} {%- if shape == 'poster' -%}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.grid.backdrop }}?class=bannersm&type=webp 256w, {{ globals.cdn_url }}{{ item.grid.backdrop }}?class=bannersm&type=webp 256w,
https://cdn.coryd.dev{{ item.grid.backdrop }}?class=bannermd&type=webp 512w {{ globals.cdn_url }}{{ item.grid.backdrop }}?class=bannermd&type=webp 512w
" "
sizes="(max-width: 450px) 256px, 512px" sizes="(max-width: 450px) 256px, 512px"
src="https://cdn.coryd.dev{{ item.grid.backdrop }}?class=bannersm&type=webp" src="{{ globals.cdn_url }}{{ item.grid.backdrop }}?class=bannersm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"
@ -27,11 +27,11 @@
{%- elsif shape == 'square' -%} {%- elsif shape == 'square' -%}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.grid.image }}?class=squaresm&type=webp 200w, {{ globals.cdn_url }}{{ item.grid.image }}?class=squaresm&type=webp 200w,
https://cdn.coryd.dev{{ item.grid.image }}?class=squaremd&type=webp 400w {{ globals.cdn_url }}{{ item.grid.image }}?class=squaremd&type=webp 400w
" "
sizes="(max-width: 450px) 200px, 400px" sizes="(max-width: 450px) 200px, 400px"
src="https://cdn.coryd.dev{{ item.grid.image }}?class=squaresm&type=webp" src="{{ globals.cdn_url }}{{ item.grid.image }}?class=squaresm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"
@ -41,11 +41,11 @@
{%- elsif shape == 'vertical' -%} {%- elsif shape == 'vertical' -%}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.grid.image }}?class=verticalsm&type=webp 200w, {{ globals.cdn_url }}{{ item.grid.image }}?class=verticalsm&type=webp 200w,
https://cdn.coryd.dev{{ item.grid.image }}?class=verticalmd&type=webp 400w {{ globals.cdn_url }}{{ item.grid.image }}?class=verticalmd&type=webp 400w
" "
sizes="(max-width: 450px) 200px, 400px" sizes="(max-width: 450px) 200px, 400px"
src="https://cdn.coryd.dev{{ item.grid.image }}?class=verticalsm&type=webp" src="{{ globals.cdn_url }}{{ item.grid.image }}?class=verticalsm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"

View file

@ -5,11 +5,11 @@
<a href="{{ item.chart.url }}"> <a href="{{ item.chart.url }}">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.chart.image }}?class=w50&type=webp 50w, {{ globals.cdn_url }}{{ item.chart.image }}?class=w50&type=webp 50w,
https://cdn.coryd.dev{{ item.chart.image }}?class=w100&type=webp 100w {{ globals.cdn_url }}{{ item.chart.image }}?class=w100&type=webp 100w
" "
sizes="(max-width: 450px) 50px, 100px" sizes="(max-width: 450px) 50px, 100px"
src="https://cdn.coryd.dev{{ item.chart.image }}?class=w50&type=webp" src="{{ globals.cdn_url }}{{ item.chart.image }}?class=w50&type=webp"
alt="{{ item.chart.alt }}" alt="{{ item.chart.alt }}"
loading="lazy" loading="lazy"
decoding="async" decoding="async"

View file

@ -11,16 +11,16 @@
</div> </div>
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm 256w, {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm 256w,
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannermd 512w, {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannermd 512w,
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerbase 1024w, {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerbase 1024w,
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg 2048w {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg" src="{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerlg"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="1080" width="1080"

View file

@ -15,15 +15,15 @@ schema: book
<div class="book-display"> <div class="book-display">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp 200w, {{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp 200w,
https://cdn.coryd.dev{{ book.image }}?class=verticalmd&type=webp 400w, {{ globals.cdn_url }}{{ book.image }}?class=verticalmd&type=webp 400w,
https://cdn.coryd.dev{{ book.image }}?class=verticalbase&type=webp 800w {{ globals.cdn_url }}{{ book.image }}?class=verticalbase&type=webp 800w
" "
sizes="(max-width: 450px) 203px, sizes="(max-width: 450px) 203px,
(max-width: 850px) 406px, (max-width: 850px) 406px,
(max-width: 1000px) 812px, (max-width: 1000px) 812px,
812px" 812px"
src="https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp" src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
loading="lazy" loading="lazy"
decoding="async" decoding="async"

View file

@ -20,12 +20,12 @@ schema: books
<a href="{{ book.url }}"> <a href="{{ book.url }}">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp 200w, {{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp 200w,
https://cdn.coryd.dev{{ book.image }}?class=verticalmd&type=webp 400w {{ globals.cdn_url }}{{ book.image }}?class=verticalmd&type=webp 400w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
400px" 400px"
src="https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp" src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
loading="lazy" loading="lazy"
decoding="async" decoding="async"

View file

@ -21,4 +21,4 @@ schema: books-year
<p>I finished <strong class="highlight-text">{{ bookData.size }} books</strong> in <strong class="highlight-text">{{ year.value }}</strong>.{%- if favoriteBooks %} Among my favorites were {{ favoriteBooks }}.{%- endif -%}</p> <p>I finished <strong class="highlight-text">{{ bookData.size }} books</strong> in <strong class="highlight-text">{{ year.value }}</strong>.{%- if favoriteBooks %} Among my favorites were {{ favoriteBooks }}.{%- endif -%}</p>
{% endif %} {% endif %}
<hr /> <hr />
{% render "partials/media/grid.liquid", data:bookData, shape:"vertical", count: 200, loading: "eager" %} {% render "partials/media/grid.liquid", globals:globals, data:bookData, shape:"vertical", count: 200, loading: "eager" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p> <p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p> <p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p> <p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p> <p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -24,14 +24,14 @@ schema: artist
<div class="artist-display"> <div class="artist-display">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ artist.image }}?class=w200&type=webp 200w, {{ globals.cdn_url }}{{ artist.image }}?class=w200&type=webp 200w,
https://cdn.coryd.dev{{ artist.image }}?class=w600&type=webp 400w, {{ globals.cdn_url }}{{ artist.image }}?class=w600&type=webp 400w,
https://cdn.coryd.dev{{ artist.image }}?class=w800&type=webp 800w {{ globals.cdn_url }}{{ artist.image }}?class=w800&type=webp 800w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
800px" 800px"
src="https://cdn.coryd.dev{{ artist.image }}?class=w200&type=webp" src="{{ globals.cdn_url }}{{ artist.image }}?class=w200&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
loading="eager" loading="eager"
decoding="async" decoding="async"

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p> <p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p> <p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -18,14 +18,14 @@ schema: music-index
Artists Artists
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:music.week.artists, shape:"square", count: 8, loading: "eager" %} {% render "partials/media/grid.liquid", globals:globals, data:music.week.artists, shape:"square", count: 8, loading: "eager" %}
<h3 id="albums"> <h3 id="albums">
<a class="icon-link" href="/music/albums/this-week"> <a class="icon-link" href="/music/albums/this-week">
{% tablericon "vinyl" %} {% tablericon "vinyl" %}
Albums Albums
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:music.week.albums, shape:"square", count: 8 %} {% render "partials/media/grid.liquid", globals:globals, data:music.week.albums, shape:"square", count: 8 %}
<h3 id="tracks"> <h3 id="tracks">
<a class="icon-link" href="/music/tracks/this-week"> <a class="icon-link" href="/music/tracks/this-week">
{% tablericon "playlist" %} {% tablericon "playlist" %}
@ -38,7 +38,7 @@ schema: music-index
<label for="tracks-recent" class="button" data-toggle="tracks-recent">Recent</label> <label for="tracks-recent" class="button" data-toggle="tracks-recent">Recent</label>
<label for="tracks-chart" class="button" data-toggle="tracks-chart">This week</label> <label for="tracks-chart" class="button" data-toggle="tracks-chart">This week</label>
<div class="tracks-recent"> <div class="tracks-recent">
{% render "partials/media/music/recent", data:music.recent %} {% render "partials/media/music/recent", globals:globals, data:music.recent %}
</div> </div>
<div class="tracks-chart"> <div class="tracks-chart">
{% render "partials/media/music/chart.liquid", data:music.week.tracks, count: 10 %} {% render "partials/media/music/chart.liquid", data:music.week.tracks, count: 10 %}
@ -49,5 +49,5 @@ schema: music-index
{% tablericon "calendar-time" %} {% tablericon "calendar-time" %}
Anticipated albums Anticipated albums
</h3> </h3>
{% render "partials/media/grid.liquid", data:albumReleases.upcoming, shape:"square", count: 8 %} {% render "partials/media/grid.liquid", globals:globals, data:albumReleases.upcoming, shape:"square", count: 8 %}
{% endif %} {% endif %}

View file

@ -18,14 +18,14 @@ schema: music-period
Artists Artists
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:music.threeMonth.artists, shape:"square", count: 8, loading: "eager" %} {% render "partials/media/grid.liquid", globals:globals, data:music.threeMonth.artists, shape:"square", count: 8, loading: "eager" %}
<h3 id="albums"> <h3 id="albums">
<a class="icon-link" href="/music/albums/three-months"> <a class="icon-link" href="/music/albums/three-months">
{% tablericon "vinyl" %} {% tablericon "vinyl" %}
Albums Albums
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:music.threeMonth.albums, shape:"square", count: 8 %} {% render "partials/media/grid.liquid", globals:globals, data:music.threeMonth.albums, shape:"square", count: 8 %}
<h3 id="tracks"> <h3 id="tracks">
<a class="icon-link" href="/music/tracks/three-months"> <a class="icon-link" href="/music/tracks/three-months">
{% tablericon "playlist" %} {% tablericon "playlist" %}

View file

@ -18,14 +18,14 @@ schema: music-period
Artists Artists
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:music.month.artists, shape:"square", count: 8, loading: "eager" %} {% render "partials/media/grid.liquid", globals:globals, data:music.month.artists, shape:"square", count: 8, loading: "eager" %}
<h3 id="albums"> <h3 id="albums">
<a class="icon-link" href="/music/albums/this-month"> <a class="icon-link" href="/music/albums/this-month">
{% tablericon "vinyl" %} {% tablericon "vinyl" %}
Albums Albums
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:music.month.albums, shape:"square", count: 8 %} {% render "partials/media/grid.liquid", globals:globals, data:music.month.albums, shape:"square", count: 8 %}
<h3 id="tracks"> <h3 id="tracks">
<a class="icon-link" href="/music/tracks/this-month"> <a class="icon-link" href="/music/tracks/this-month">
{% tablericon "playlist" %} {% tablericon "playlist" %}

View file

@ -6,7 +6,7 @@ pagination:
alias: page alias: page
description: "{{ page.description }}" description: "{{ page.description }}"
permalink: "{{ page.permalink }}/index.html" permalink: "{{ page.permalink }}/index.html"
image: "{{ page.open_graph_image | prepend: 'https://cdn.coryd.dev' | default: globals.avatar }}" image: "{{ page.open_graph_image | prepend: globals.cdn_url | default: globals.avatar }}"
updated: {{ page.updated | default: null }} updated: {{ page.updated | default: null }}
--- ---
{% render "partials/blocks/index.liquid", blocks:page.blocks %} {% render "partials/blocks/index.liquid", blocks:page.blocks %}

View file

@ -22,16 +22,16 @@ schema: blog
{%- if post.image -%} {%- if post.image -%}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ post.image }}?class=w200&type=webp 200w, {{ globals.cdn_url }}{{ post.image }}?class=w200&type=webp 200w,
https://cdn.coryd.dev{{ post.image }}?class=w400&type=webp 400w, {{ globals.cdn_url }}{{ post.image }}?class=w400&type=webp 400w,
https://cdn.coryd.dev{{ post.image }}?class=w800&type=webp 800w, {{ globals.cdn_url }}{{ post.image }}?class=w800&type=webp 800w,
https://cdn.coryd.dev{{ post.image }}?class=w1600&type=webp 1600w {{ globals.cdn_url }}{{ post.image }}?class=w1600&type=webp 1600w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 1000px) 800px, (max-width: 1000px) 800px,
1200px" 1200px"
src="https://cdn.coryd.dev{{ post.image }}?class=w200" src="{{ globals.cdn_url }}{{ post.image }}?class=w200"
alt="{{ post.image_alt }}" alt="{{ post.image_alt }}"
class="image-banner" class="image-banner"
loading="eager" loading="eager"

View file

@ -14,4 +14,4 @@ schema: favorite-movies
<p>These are my favorite movies. There are many like them, but these are mine.</p> <p>These are my favorite movies. There are many like them, but these are mine.</p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -14,4 +14,4 @@ schema: favorite-shows
<p>These are my favorite shows. There are many like them, but these are mine.</p> <p>These are my favorite shows. There are many like them, but these are mine.</p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -8,7 +8,7 @@ schema: watching
--- ---
{%- assign featuredMovie = movies.recentlyWatched | shuffleArray | first -%} {%- assign featuredMovie = movies.recentlyWatched | shuffleArray | first -%}
<h2 class="watching">{{ title }}</h2> <h2 class="watching">{{ title }}</h2>
{% render "partials/media/watching/hero.liquid" movie:featuredMovie %} {% render "partials/media/watching/hero.liquid", globals:globals, movie:featuredMovie %}
<p>Here's all of the TV and movies I've been watching presented in what is (hopefully) an organized fashion.</p> <p>Here's all of the TV and movies I've been watching presented in what is (hopefully) an organized fashion.</p>
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/movies", text: "Subscribe to my movies feed or follow along on this page" %} {% render "partials/blocks/banners/rss.liquid", url: "/feeds/movies", text: "Subscribe to my movies feed or follow along on this page" %}
<hr /> <hr />
@ -18,14 +18,14 @@ schema: watching
Recent movies Recent movies
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:movies.recentlyWatched, shape:"vertical", count: 6 %} {% render "partials/media/grid.liquid", globals:globals, data:movies.recentlyWatched, shape:"vertical", count: 6 %}
<h3 id="tv"> <h3 id="tv">
<a class="icon-link" href="/watching/recent/shows"> <a class="icon-link" href="/watching/recent/shows">
{% tablericon "device-tv-old" %} {% tablericon "device-tv-old" %}
Recent shows Recent shows
</a> </a>
</h3> </h3>
{% render "partials/media/grid.liquid", data:tv.recentlyWatched, shape:"vertical", count: 6 %} {% render "partials/media/grid.liquid", globals:globals, data:tv.recentlyWatched, shape:"vertical", count: 6 %}
<h3 id="favorite-movies"> <h3 id="favorite-movies">
<a class="icon-link" href="/watching/favorite-movies"> <a class="icon-link" href="/watching/favorite-movies">
{% tablericon "star" %} {% tablericon "star" %}
@ -33,7 +33,7 @@ schema: watching
</a> </a>
</h3> </h3>
{% assign favoriteMovies = movies.favorites | shuffleArray %} {% assign favoriteMovies = movies.favorites | shuffleArray %}
{% render "partials/media/grid.liquid", data:favoriteMovies, shape:"vertical", count: 6 %} {% render "partials/media/grid.liquid", globals:globals, data:favoriteMovies, shape:"vertical", count: 6 %}
<h3 id="favorite-shows"> <h3 id="favorite-shows">
<a class="icon-link" href="/watching/favorite-shows"> <a class="icon-link" href="/watching/favorite-shows">
{% tablericon "star" %} {% tablericon "star" %}
@ -41,4 +41,4 @@ schema: watching
</a> </a>
</h3> </h3>
{% assign favoriteShows = tv.favorites | shuffleArray %} {% assign favoriteShows = tv.favorites | shuffleArray %}
{% render "partials/media/grid.liquid", data:favoriteShows, shape:"vertical", count: 6 %} {% render "partials/media/grid.liquid", globals:globals, data:favoriteShows, shape:"vertical", count: 6 %}

View file

@ -14,14 +14,14 @@ schema: movie
<article class="watching focus"> <article class="watching focus">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm&type=webp 256w, {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm&type=webp 256w,
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannermd&type=webp 512w, {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannermd&type=webp 512w,
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerbase&type=webp 1024w {{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerbase&type=webp 1024w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
1024px" 1024px"
src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm&type=webp" src="{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
loading="eager" loading="eager"

View file

@ -14,4 +14,4 @@ schema: watching
<p>These are the movies I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p> <p>These are the movies I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -14,4 +14,4 @@ schema: watching-shows
<p>These are the shows I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p> <p>These are the shows I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p>
<hr /> <hr />
{% endif %} {% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %} {% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -14,14 +14,14 @@ schema: show
<article class="watching focus"> <article class="watching focus">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ show.backdrop }}?class=bannersm&type=webp 256w, {{ globals.cdn_url }}{{ show.backdrop }}?class=bannersm&type=webp 256w,
https://cdn.coryd.dev{{ show.backdrop }}?class=bannermd&type=webp 512w, {{ globals.cdn_url }}{{ show.backdrop }}?class=bannermd&type=webp 512w,
https://cdn.coryd.dev{{ show.backdrop }}?class=bannerbase&type=webp 1024w {{ globals.cdn_url }}{{ show.backdrop }}?class=bannerbase&type=webp 1024w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
1024px" 1024px"
src="https://cdn.coryd.dev{{ show.backdrop }}?class=bannersm&type=webp" src="{{ globals.cdn_url }}{{ show.backdrop }}?class=bannersm&type=webp"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
loading="eager" loading="eager"

View file

@ -27,7 +27,7 @@ eleventyExcludeFromCollections: true
{ {
"rel":"http://webfinger.net/rel/avatar", "rel":"http://webfinger.net/rel/avatar",
"type":"image/png", "type":"image/png",
"href":"https://cdn.coryd.dev/f7516bb2-d914-479f-91c6-1bf96f3968bf.png?class=squarebase" "href":"{{ globals.cdn_url }}/f7516bb2-d914-479f-91c6-1bf96f3968bf.png?class=squarebase"
} }
] ]
} }

View file

@ -1,12 +1,13 @@
CREATE OR REPLACE VIEW optimized_globals AS CREATE OR REPLACE VIEW optimized_globals AS
SELECT SELECT
g.id,
g.site_name, g.site_name,
g.site_description, g.site_description,
g.intro,
g.author, g.author,
g.email, g.email,
g.mastodon, g.mastodon,
g.url, g.url,
g.cdn_url,
g.theme_color, g.theme_color,
g.site_type, g.site_type,
g.locale, g.locale,