feat: move images to b2 and route through bunny

This commit is contained in:
Cory Dransfeldt 2024-07-10 08:57:00 -07:00
parent cb2d536189
commit 6a338ceb92
No known key found for this signature in database
32 changed files with 322 additions and 375 deletions

View file

@ -4,6 +4,6 @@ Hi! I'm Cory. 👋🏻
This is the code for my personal website and portfolio. Built using [11ty](https://www.11ty.dev).
[![Follow @cory@social.lol on Mastodon](https://cdn.coryd.dev/assets/badges/mastodon.png?class=w200)](https://social.lol/@cory) [![Buy me a Coffee](https://cdn.coryd.dev/assets/badges/buymeacoffee.png?class=w200)](https://www.buymeacoffee.com/cory) [![Made with 11ty](https://cdn.coryd.dev/assets/badges/eleventy.png?class=w200)](https://eleventy.dev)
[![Follow @cory@social.lol on Mastodon](https://cdn.coryd.dev/aec0ea1d-5234-40b3-b7c4-9705fd9cd0e4.png?class=w200)](https://social.lol/@cory) [![Buy me a Coffee](https://cdn.coryd.dev/f5b2cae1-331a-4ea0-9962-58ac429cac4a.png?class=w200)](https://www.buymeacoffee.com/cory) [![Made with 11ty](https://cdn.coryd.dev/03c57479-cfa6-423f-8f60-87f3bbef156c.png?class=w200)](https://eleventy.dev)
[Music](https://coryd.dev/music) / [Watching](https://coryd.dev/watching) / [Books](https://coryd.dev/books) / [Now](https://coryd.dev/now)

View file

@ -60,21 +60,6 @@ robotx.txt /robots.txt 301
/watching/movies-to-watch /watching 301
/blog/digital-privacy-tools /posts/2021/digital-privacy-tools/ 301
# assets
/favicon.ico https://cdn.coryd.dev/assets/icons/favicon.ico 301
/assets/icons/favicon.ico https://cdn.coryd.dev/assets/icons/favicon.ico 301
/apple-touch-icon.png https://cdn.coryd.dev/assets/icons/apple-touch-icon.png 301
/apple-touch-icon https://cdn.coryd.dev/assets/icons/apple-touch-icon.png 301
/apple-touch-icon-precomposed.png https://cdn.coryd.dev/assets/icons/apple-touch-icon.png 301
/assets/icons/apple-touch-icon.png https://cdn.coryd.dev/assets/icons/apple-touch-icon.png 301
/assets/img/feed-icon.png https://cdn.coryd.dev/assets/icons/apple-touch-icon.png 301
/assets/img/logo.webp https://cdn.coryd.dev/assets/avatar.webp 301
/static/favicons/apple-touch-icon.png https://cdn.coryd.dev/assets/icons/apple-touch-icon.png 301
/static/images/avatar.png https://cdn.coryd.dev/assets/avatar.png 301
/static/images/avatar.webp https://cdn.coryd.dev/assets/avatar.webp 301
/assets/img/favicon/favicon-32x32.png https://cdn.coryd.dev/assets/icons/favicon.ico 301
/assets/img/favicon/favicon-16x16.png https://cdn.coryd.dev/assets/icons/favicon.ico 301
# feeds
/rss https://feedpress.me/coryd 301
/atom https://feedpress.me/coryd 301
@ -98,4 +83,5 @@ robotx.txt /robots.txt 301
/coffee https://www.buymeacoffee.com/cory 301
/tags /search 301
/tags/* /search 301
/music/genre/* /music/genres/:splat 301
/music/genre/* /music/genres/:splat 301
/reading /books

50
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "coryd.dev",
"version": "19.10.11",
"version": "20.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
"version": "19.10.11",
"version": "20.0.0",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.4.0",
@ -24,14 +24,14 @@
"@supabase/supabase-js": "^2.44.3",
"dotenv-flow": "^4.1.0",
"html-minifier-terser": "^7.2.0",
"liquidjs": "^10.14.0",
"liquidjs": "^10.15.0",
"luxon": "^3.4.4",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.0.1",
"markdown-it-footnote": "^4.0.0",
"sanitize-html": "^2.13.0",
"slugify": "^1.6.6",
"terser": "^5.31.1"
"terser": "^5.31.2"
}
},
"node_modules/@11ty/dependency-tree": {
@ -335,9 +335,9 @@
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.15",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"dev": true,
"license": "MIT"
},
@ -755,9 +755,9 @@
}
},
"node_modules/browserslist": {
"version": "4.23.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz",
"integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==",
"version": "4.23.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz",
"integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==",
"dev": true,
"funding": [
{
@ -775,10 +775,10 @@
],
"license": "MIT",
"dependencies": {
"caniuse-lite": "^1.0.30001629",
"electron-to-chromium": "^1.4.796",
"caniuse-lite": "^1.0.30001640",
"electron-to-chromium": "^1.4.820",
"node-releases": "^2.0.14",
"update-browserslist-db": "^1.0.16"
"update-browserslist-db": "^1.1.0"
},
"bin": {
"browserslist": "cli.js"
@ -826,9 +826,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001640",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001640.tgz",
"integrity": "sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA==",
"version": "1.0.30001641",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz",
"integrity": "sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==",
"dev": true,
"funding": [
{
@ -1157,9 +1157,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.4.818",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.818.tgz",
"integrity": "sha512-eGvIk2V0dGImV9gWLq8fDfTTsCAeMDwZqEPMr+jMInxZdnp9Us8UpovYpRCf9NQ7VOFgrN2doNSgvISbsbNpxA==",
"version": "1.4.823",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.823.tgz",
"integrity": "sha512-4h+oPeAiGQOHFyUJOqpoEcPj/xxlicxBzOErVeYVMMmAiXUXsGpsFd0QXBMaUUbnD8hhSfLf9uw+MlsoIA7j5w==",
"dev": true,
"license": "ISC"
},
@ -2153,9 +2153,9 @@
}
},
"node_modules/liquidjs": {
"version": "10.14.0",
"resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.14.0.tgz",
"integrity": "sha512-Zjg35Yo3L/2aNy7QkICha/ulbXRtZS7oRenWyDDfw+J34Xy3fOKWWHxASC9r0gbxN661nrwmG/kOIKHfYcVk4Q==",
"version": "10.15.0",
"resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.15.0.tgz",
"integrity": "sha512-u5lYWhW8ioT+O3FdCcp5U+hiPEGNO4xASCFlCHA+k5rMTJwDIa2c2KF111ZDKc2xGM7LXPvMoNRIrBfbLNpRBg==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -3321,9 +3321,9 @@
}
},
"node_modules/terser": {
"version": "5.31.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz",
"integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==",
"version": "5.31.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.31.2.tgz",
"integrity": "sha512-LGyRZVFm/QElZHy/CPr/O4eNZOZIzsrQ92y4v9UJe/pFJjypje2yI3C2FmPtvUEnhadlSbmG2nXtdcjHOjCfxw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "19.10.11",
"version": "20.0.0",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {
@ -34,13 +34,13 @@
"@supabase/supabase-js": "^2.44.3",
"dotenv-flow": "^4.1.0",
"html-minifier-terser": "^7.2.0",
"liquidjs": "^10.14.0",
"liquidjs": "^10.15.0",
"luxon": "^3.4.4",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.0.1",
"markdown-it-footnote": "^4.0.0",
"sanitize-html": "^2.13.0",
"slugify": "^1.6.6",
"terser": "^5.31.1"
"terser": "^5.31.2"
}
}

View file

@ -54,7 +54,7 @@ const fetchGenreMapping = async () => {
export default async function () {
const genreMapping = await fetchGenreMapping()
const artists = await fetchPaginatedData('artists', 'id, mbid, name_string, image, total_plays, country, description, favorite, tattoo, genres')
const artists = await fetchPaginatedData('artists', 'id, mbid, name_string, art(filename_disk), total_plays, country, description, favorite, tattoo, genres')
const albums = await fetchPaginatedData('albums', 'mbid, name, release_year, total_plays, artist')
const albumsByArtist = albums.reduce((acc, album) => {
if (!acc[album.artist]) acc[album.artist] = []
@ -68,9 +68,10 @@ export default async function () {
}, {})
for (const artist of artists) {
artist.albums = albumsByArtist[artist.id]?.sort((a, b) => a['release_year'] - b['release_year']) || []
artist.country = parseCountryField(artist.country)
artist.genres = genreMapping[artist.genres] || ''
artist.albums = albumsByArtist[artist['id']]?.sort((a, b) => a['release_year'] - b['release_year']) || []
artist.image = `/${artist['art']['filename_disk']}`
artist.country = parseCountryField(artist['country'])
artist.genres = genreMapping[artist['genres']] || ''
}
return artists

30
src/_data/badges.js Normal file
View file

@ -0,0 +1,30 @@
import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env.SUPABASE_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
const fetchAllBadges = async () => {
const { data, error } = await supabase
.from('badges')
.select(`
*,
image(filename_disk)
`)
if (error) {
console.error('Error fetching badge data:', error)
return null
}
const transformedData = data.map(badge => ({
...badge,
image: badge['image']['filename_disk'],
}))
return transformedData
}
export default async function () {
return await fetchAllBadges()
}

View file

@ -28,7 +28,7 @@ async function fetchAllBooks() {
while (true) {
const { data, error } = await supabase
.from('books')
.select('*')
.select(`*, art(filename_disk)`)
.range(from, to)
if (error) {
@ -60,7 +60,7 @@ export default async function () {
review: book['review'],
rating: book['star_rating'] !== 'unrated' ? book['star_rating'] : '',
description: book['description'],
image: book['thumbnail'],
image: `/${book?.['art']?.['filename_disk']}`,
url: `/books/${book['isbn']}`,
date: book['date_finished'],
status: book['read_status'],

52
src/_data/globals.js Normal file
View file

@ -0,0 +1,52 @@
import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = process.env['SUPABASE_URL']
const SUPABASE_KEY = process.env['SUPABASE_KEY']
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
export default async function () {
const { data, error } = await supabase
.from('globals')
.select(`
*,
favicon_ico(filename_disk),
favicon_svg(filename_disk),
opengraph_default(filename_disk),
feed_image(filename_disk),
apple_touch_icon(filename_disk),
about(filename_disk),
page_404(filename_disk),
page_broken(filename_disk),
page_not_allowed(filename_disk),
page_stop(filename_disk),
logo_the_claw(filename_disk)
`)
if (error) {
console.error('Error fetching globals:', error)
return {}
}
const globalData = data.pop()
const keysToProcess = [
'favicon_ico',
'favicon_svg',
'opengraph_default',
'feed_image',
'apple_touch_icon',
'about',
'page_404',
'page_broken',
'page_not_allowed',
'page_stop',
'logo_the_claw'
]
keysToProcess.forEach(key => {
if (globalData[key] && globalData[key].filename_disk) {
globalData[key] = globalData[key].filename_disk
}
})
return globalData
}

View file

@ -1,16 +0,0 @@
export default async function () {
return {
"siteName": "Cory Dransfeldt",
"siteDescription": "I'm a software developer in Camarillo, California. I write about software development, technology and music.",
"author": "Cory Dransfeldt",
"email": "hi@coryd.dev",
"url": "https://coryd.dev",
"themeColor": "#3b82f6",
"siteType": "Person",
"locale": "en_US",
"lang": "en",
"meta_data": {
"opengraph_default": "https://cdn.coryd.dev/assets/avatar.png"
}
}
}

View file

@ -30,7 +30,6 @@ const fetchAllMovies = async () => {
.select(`
id,
tmdb_id,
slug,
last_watched,
title,
year,
@ -39,7 +38,9 @@ const fetchAllMovies = async () => {
favorite,
star_rating,
description,
review
review,
art(filename_disk),
backdrop(filename_disk)
`)
.order('last_watched', { ascending: false })
.range(rangeStart, rangeStart + PAGE_SIZE - 1)
@ -73,8 +74,8 @@ export default async function () {
year: item['year'],
url: `/watching/movies/${item['tmdb_id']}`,
description: `${item['title']} (${item['year']})<br/>Watched at: ${DateTime.fromISO(item['last_watched'], { zone: 'utc' }).setZone('America/Los_Angeles').toFormat('MMMM d, yyyy, h:mma')}`,
image: `/movies/poster-${item['tmdb_id']}.jpg`,
backdrop: `/movies/backdrops/backdrop-${item['tmdb_id']}.jpg`,
image: `/${item?.['art']?.['filename_disk']}`,
backdrop: `/${item?.['backdrop']?.['filename_disk']}`,
plays: item['plays'],
collected: item['collected'],
favorite: item['favorite'],

View file

@ -61,7 +61,7 @@ const aggregateData = async (data, groupByField, groupByType) => {
plays: 0,
mbid: item['albums']['mbid'],
url: `/music/artists/${sanitizeMediaString(item['artist_name'])}-${sanitizeMediaString(parseCountryField(item['artists']['country']))}`,
image: item['albums']?.['image'] || '',
image: `/${item['albums']?.['art']?.['filename_disk']}` || '',
timestamp: item['listened_at'],
type: groupByType,
genre: genreMapping[item['artists']['genres']] || ''
@ -72,7 +72,7 @@ const aggregateData = async (data, groupByField, groupByType) => {
plays: 0,
mbid: item[groupByType]?.['mbid'] || '',
url: `/music/artists/${sanitizeMediaString(item['artist_name'])}-${sanitizeMediaString(parseCountryField(item['artists']['country']))}`,
image: item[groupByType]?.image || '',
image: `/${item[groupByType]?.['art']?.['filename_disk']}` || '',
type: groupByType,
genre: genreMapping[item['artists']['genres']] || ''
}
@ -97,7 +97,7 @@ const buildRecents = async (data) => {
artist: listen['artist_name'],
url: `/music/artists/${sanitizeMediaString(listen['artist_name'])}-${sanitizeMediaString(parseCountryField(listen['artists']['country']))}`,
timestamp: listen['listened_at'],
image: listen['albums']?.['image'] || ''
image: `/${listen['albums']?.['art']?.['filename_disk']}` || ''
}))
}
@ -128,8 +128,8 @@ export default async function() {
album_name,
album_key,
listened_at,
artists (mbid, image, genres, country),
albums (mbid, image)
artists (mbid, art(filename_disk), genres, country),
albums (mbid, art(filename_disk))
`
for (const [period, startPeriod] of Object.entries(periods)) {

View file

@ -66,7 +66,10 @@ const fetchAllPosts = async () => {
while (fetchMore) {
const { data, error } = await supabase
.from('posts')
.select('*')
.select(`
*,
image(filename_disk)
`)
.order('date', { ascending: false })
.range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1)
@ -78,17 +81,17 @@ const fetchAllPosts = async () => {
if (data.length < PAGE_SIZE) fetchMore = false
for (const post of data) {
if (uniqueSlugs.has(post.slug)) continue
if (uniqueSlugs.has(post['slug'])) continue
uniqueSlugs.add(post.slug)
post.tags = await fetchTagsForPost(post.id)
post.blocks = await fetchBlocksForPost(post.id)
post['tags'] = await fetchTagsForPost(post['id'])
post['blocks'] = await fetchBlocksForPost(post['id'])
if (post?.['image']?.['filename_disk']) post['image'] = post['image']['filename_disk']
posts.push(post)
}
page++
}
return posts
}

View file

@ -1,7 +1,7 @@
import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env.SUPABASE_KEY
const SUPABASE_URL = process.env['SUPABASE_URL']
const SUPABASE_KEY = process.env['SUPABASE_KEY']
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
const PAGE_SIZE = 1000
@ -21,6 +21,8 @@ const fetchAllShows = async () => {
year,
description,
review,
art(filename_disk),
backdrop(filename_disk),
episodes (
episode_number,
season_number,
@ -35,7 +37,6 @@ const fetchAllShows = async () => {
}
shows = shows.concat(data)
if (data.length < PAGE_SIZE) break
rangeStart += PAGE_SIZE
}
@ -43,38 +44,47 @@ const fetchAllShows = async () => {
return shows
}
const prepareShowData = (show) => {
return {
...show,
image: show.art?.filename_disk ? show.art.filename_disk : '',
backdrop: show.backdrop?.filename_disk ? show.backdrop.filename_disk : ''
}
}
const prepareEpisodeData = (show) => {
return show.episodes.map(episode => ({
...episode,
show_title: show.title,
show_tmdb_id: show.tmdb_id,
collected: show.collected,
favorite: show.favorite,
image: show.image,
backdrop: show.backdrop
}))
}
export default async function () {
const shows = await fetchAllShows()
const rawShows = await fetchAllShows()
const shows = rawShows.map(prepareShowData)
let episodes = []
shows.forEach(show => {
show.episodes.forEach(episode => {
episodes.push({
...episode,
show_title: show['title'],
show_tmdb_id: show['tmdb_id'],
collected: show['collected'],
favorite: show['favorite'],
year: show['year']
})
})
})
const episodes = shows.flatMap(prepareEpisodeData)
episodes.sort((a, b) => new Date(b.last_watched_at) - new Date(a.last_watched_at))
episodes.sort((a, b) => new Date(b['last_watched_at']) - new Date(a['last_watched_at']))
const allEpisodes = episodes
const recentlyWatchedEpisodes = episodes.slice(0, 225)
const formatEpisodeData = (episodes) => {
const episodeData = []
const showEpisodesMap = {}
episodes.forEach((episode) => {
const showTitle = episode['show_title']
const showTmdbId = episode['show_tmdb_id']
const episodeNumber = episode['episode_number']
const seasonNumber = episode['season_number']
const lastWatchedAt = episode['last_watched_at']
const collected = episode['collected']
const favorite = episode['favorite']
episodes.forEach(episode => {
const showTitle = episode.show_title
const showTmdbId = episode.show_tmdb_id
const episodeNumber = episode.episode_number
const seasonNumber = episode.season_number
const lastWatchedAt = episode.last_watched_at
const collected = episode.collected
const favorite = episode.favorite
const image = episode.image
const backdrop = episode.backdrop
if (!showEpisodesMap[showTmdbId]) {
showEpisodesMap[showTmdbId] = {
@ -84,7 +94,9 @@ export default async function () {
favorite,
dateAdded: lastWatchedAt,
lastWatchedAt,
episodes: []
episodes: [],
image,
backdrop
}
}
@ -96,41 +108,44 @@ export default async function () {
season: seasonNumber,
tmdbId: showTmdbId,
type: 'tv',
image: `/shows/poster-${showTmdbId}.jpg`,
backdrop: `/shows/backdrops/backdrop-${showTmdbId}.jpg`,
dateAdded: lastWatchedAt,
lastWatchedAt
lastWatchedAt,
image,
backdrop
})
})
const sortedShows = Object.values(showEpisodesMap).sort((a, b) => new Date(b['episodes'][0]['lastWatchedAt']) - new Date(a['episodes'][0]['lastWatchedAt']))
const sortedShows = Object.values(showEpisodesMap).sort((a, b) => new Date(b.episodes[0].lastWatchedAt) - new Date(a.episodes[0].lastWatchedAt))
sortedShows.forEach((show) => {
const startingEpisode = show['episodes'][show['episodes'].length - 1]['episode']
const startingSeason = show['episodes'][show['episodes'].length - 1]['season']
const endingEpisode = show['episodes'][0]['episode']
const endingSeason = show['episodes'][0]['season']
const episodeData = []
sortedShows.forEach(show => {
const startingEpisode = show.episodes[show.episodes.length - 1].episode
const startingSeason = show.episodes[show.episodes.length - 1].season
const endingEpisode = show.episodes[0].episode
const endingSeason = show.episodes[0].season
if (show.episodes.length > 1) {
episodeData.push({
name: show['title'],
url: `/watching/shows/${show['tmdbId']}`,
name: show.title,
url: `/watching/shows/${show.tmdbId}`,
subtext: `S${startingSeason}E${startingEpisode} - S${endingSeason}E${endingEpisode}`,
startingEpisode,
startingSeason,
episode: endingEpisode,
season: endingSeason,
tmdbId: show['tmdbId'],
collected: show['collected'],
favorite: show['favorite'],
tmdbId: show.tmdbId,
collected: show.collected,
favorite: show.favorite,
type: 'tv-range',
image: `/shows/poster-${show['tmdbId']}.jpg`,
backdrop: `/shows/backdrops/backdrop-${show['tmdbId']}.jpg`,
image: show.image,
backdrop: show.backdrop
})
} else {
const singleEpisode = show['episodes'][0]
singleEpisode['collected'] = show['collected']
singleEpisode['favorite'] = show['favorite']
const singleEpisode = show.episodes[0]
singleEpisode.collected = show.collected
singleEpisode.favorite = show.favorite
singleEpisode.image = show.image
singleEpisode.backdrop = show.backdrop
episodeData.push(singleEpisode)
}
})
@ -138,20 +153,12 @@ export default async function () {
return episodeData
}
const favoriteShows = shows.filter(show => show['favorite'])
const collectedShows = shows.filter(show => show['collected'])
const toWatch = shows.map(show => ({...show, url: `/watching/shows/${show['tmdb_id']}`})).filter(show => !show.episodes.some(episode => episode.last_watched_at)).sort((a, b) => a['title'].localeCompare(b['title']))
const favoriteShows = shows.filter(show => show.favorite)
return {
shows,
watchHistory: formatEpisodeData(allEpisodes),
recentlyWatched: formatEpisodeData(recentlyWatchedEpisodes),
favorites: formatEpisodeData(favoriteShows.flatMap(show => show['episodes'].map(episode => ({
...episode,
show_title: show['title'],
show_tmdb_id: show['tmdb_id'],
collected: show['collected'],
favorite: show['favorite']
})))).sort((a, b) => a['name'].localeCompare(b['name']))
watchHistory: formatEpisodeData(episodes),
recentlyWatched: formatEpisodeData(episodes.slice(0, 225)),
favorites: formatEpisodeData(favoriteShows.flatMap(prepareEpisodeData)).sort((a, b) => a.name.localeCompare(b.name))
}
}

View file

@ -1,31 +1,31 @@
{%- assign fullUrl = meta.url | append: page.url -%}
{%- assign fullUrl = globals.url | append: page.url -%}
{%- assign pageTitle = meta.siteName -%}
{%- assign pageTitle = globals.site_name -%}
{%- if schema == 'blog' -%}
{%- assign pageTitle = post.title -%}
{%- elsif title -%}
{%- assign pageTitle = title | append: ' / ' | append: meta.siteName -%}
{%- assign pageTitle = title | append: ' / ' | append: globals.site_name -%}
{%- elsif artist.name_string -%}
{%- assign pageTitle = 'Artists / ' | append: artist.name_string | append: ' / ' | append: meta.siteName -%}
{%- assign pageTitle = 'Artists / ' | append: artist.name_string | append: ' / ' | append: globals.site_name -%}
{%- elsif schema == 'music-index' -%}
{%- assign pageTitle = 'Music / ' | append: meta.siteName -%}
{%- assign pageTitle = 'Music / ' | append: globals.site_name -%}
{%- elsif schema == 'music-period' -%}
{%- assign pageTitle = 'Music / ' | append: page.title | append: meta.siteName -%}
{%- assign pageTitle = 'Music / ' | append: page.title | append: globals.site_name -%}
{%- elsif genre.name -%}
{%- assign pageTitle = 'Music / ' | append: genre.name | append: ' / ' | append: meta.siteName -%}
{%- assign pageTitle = 'Music / ' | append: genre.name | append: ' / ' | append: globals.site_name -%}
{%- elsif book.title -%}
{%- assign pageTitle = 'Books / ' | append: book.title | append: ' / ' | append: meta.siteName -%}
{%- assign pageTitle = 'Books / ' | append: book.title | append: ' / ' | append: globals.site_name -%}
{%- elsif movie.title -%}
{%- assign pageTitle = 'Movies / ' | append: movie.title -%}
{%- if movie.rating -%}
{%- assign pageTitle = pageTitle | append: ' (' | append: movie.rating | append: ')' -%}
{%- endif -%}
{%- assign pageTitle = pageTitle | append: ' / ' | append: meta.siteName -%}
{%- assign pageTitle = pageTitle | append: ' / ' | append: globals.site_name -%}
{%- elsif show.title -%}
{%- assign pageTitle = 'Shows / ' | append: show.title | append: ' / ' | append: meta.siteName -%}
{%- assign pageTitle = 'Shows / ' | append: show.title | append: ' / ' | append: globals.site_name -%}
{%- endif -%}
{%- assign pageDescription = meta.siteDescription -%}
{%- assign pageDescription = globals.site_description -%}
{%- if schema == 'blog' -%}
{%- assign pageDescription = post.description | markdown | strip_html -%}
{%- elsif artist.description -%}
@ -42,7 +42,7 @@
{%- assign pageDescription = description -%}
{%- endif -%}
{%- assign ogImage = meta.meta_data.opengraph_default -%}
{%- assign ogImage = globals.opengraph_default -%}
{%- case schema -%}
{%- when 'music' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: page.image -%}
@ -64,7 +64,7 @@
{%- when 'movie' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: movie.backdrop -%}
{%- when 'show' -%}
{%- assign ogImage = 'https://cdn.coryd.dev/shows/backdrops/backdrop-' | append: show.tmdb_id | append: '.jpg' -%}
{%- assign ogImage = 'https://cdn.coryd.dev/shows/backdrops/backdrop-' | append: show.backdrop -%}
{%- when 'genre' -%}
{%- assign genreArtist = genre.artists | shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: genreArtist.image -%}
@ -85,21 +85,21 @@
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ fullUrl }}" />
<meta property="og:image" content="{{ ogImage }}?class=w800" />
<meta name="theme-color" content="{{ meta.themeColor }}" />
<meta name="theme-color" content="{{ globals.theme_color }}" />
<meta name="fediverse:creator" content="@cory@social.lol" />
<meta name="generator" content="Eleventy">
<meta name="robots" content="noai, noimageai">
<link href="https://cdn.coryd.dev/assets/icons/favicon.ico?v={% appVersion %}" rel="icon" sizes="any">
<link href="https://cdn.coryd.dev/assets/icons/favicon.svg?v={% appVersion %}" rel="icon" type="image/svg+xml">
<link href="https://cdn.coryd.dev/assets/icons/apple-touch-icon.png?v={% appVersion %}" rel="apple-touch-icon">
<link href="https://cdn.coryd.dev/{{ globals.favicon_ico }}?v={% appVersion %}" rel="icon" sizes="any">
<link href="https://cdn.coryd.dev/{{ globals.favicon_svg }}?v={% appVersion %}" rel="icon" type="image/svg+xml">
<link href="https://cdn.coryd.dev/{{ globals.apple_touch_icon }}?v={% appVersion %}" rel="apple-touch-icon">
<link rel="webmention" href="https://webmention.io/coryd.dev/webmention" />
<link rel="pingback" href="https://webmention.io/coryd.dev/xmlrpc" />
<link type="application/atom+xml" rel="alternate" title="{{ meta.siteName }}" href="https://feedpress.me/coryd">
<link rel="alternate" type="application/json" title="{{ meta.siteName }}" href="https://feedpress.me/coryd.json" />
<link rel="alternate" href="https://feedpress.me/coryd-links" title="{{ meta.siteName }}'s links feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-movies" title="{{ meta.siteName }}'s movies feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-books" title="{{ meta.siteName }}'s books feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-all" title="{{ meta.siteName }}'s activity feed" type="application/rss+xml">
<link type="application/atom+xml" rel="alternate" title="{{ globals.site_name }}" href="https://feedpress.me/coryd">
<link rel="alternate" type="application/json" title="{{ globals.site_name }}" href="https://feedpress.me/coryd.json" />
<link rel="alternate" href="https://feedpress.me/coryd-links" title="{{ globals.site_name }}'s links feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-movies" title="{{ globals.site_name }}'s movies feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-books" title="{{ globals.site_name }}'s books feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-all" title="{{ globals.site_name }}'s activity feed" type="application/rss+xml">
<script defer data-domain="coryd.dev" src="/js/script.outbound-links.tagged-events.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
<script type="application/ld+json">
@ -108,24 +108,24 @@
"@graph": [
{
"@type": "WebSite",
"@id": "{{ meta.url }}#website",
"url": "{{ meta.url }}",
"@id": "{{ globals.url }}#website",
"url": "{{ globals.url }}",
"name": "{{ pageTitle }}",
"description": "{{ pageDescription }}",
"inLanguage": "{{ meta.locale }}"
"inLanguage": "{{ globals.locale }}"
},
{%- if schema == 'blog' -%}
{
"@type": "BlogPosting",
"mainEntityOfPage": { "@type": "WebPage" },
"isPartOf": { "@id": "{{ meta.url }}#website" },
"isPartOf": { "@id": "{{ globals.url }}#website" },
"@id": "{{ fullUrl }}",
"headline": "{{ pageTitle }}",
"description": "{{ pageDescription }}",
"image": "{{ image | default: meta.meta_data.opengraph_default }}",
"inLanguage": "{{ meta.locale }}",
"publisher": { "@type": "{{ meta.siteType }}", "name": "{{ meta.author }}", "url": "{{ meta.url }}" },
"author": { "@type": "Person", "name": "{{ meta.author }}" },
"image": "{{ image | default: globals.meta_data.opengraph_default }}",
"inLanguage": "{{ globals.locale }}",
"publisher": { "@type": "{{ globals.site_type }}", "name": "{{ globals.author }}", "url": "{{ globals.url }}" },
"author": { "@type": "Person", "name": "{{ globals.author }}" },
"datePublished": "{{ page.date | isoDateOnly: '.' }}"
}
{%- endif -%}

View file

@ -1,7 +1,7 @@
---
layout: main
---
{% render "partials/header.liquid", meta: meta, page: page, nav: nav %}
{% render "partials/header.liquid", globals: globals, page: page, nav: nav %}
<div class="default-wrapper">
{{ content }}
</div>

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{{ permalink | absoluteUrl: meta.url }}" rel="self" type="application/rss+xml" />
<atom:link href="{{ permalink | absoluteUrl: globals.url }}" rel="self" type="application/rss+xml" />
{%- assign entries = data | normalizeEntries -%}
<title>{{ title }}</title>
<description>{{ description }}</description>
<link>{{ permalink | absoluteUrl: meta.url }}</link>
<link>{{ permalink | absoluteUrl: globals.url }}</link>
<lastBuildDate>{{ updated | stringToRFC822Date }}</lastBuildDate>
<image>
<title>{{ title }}</title>
<link>{{ permalink | absoluteUrl: meta.url }}</link>
<url>https://cdn.coryd.dev/assets/avatar.png</url>
<link>{{ permalink | absoluteUrl: globals.url }}</link>
<url>https://cdn.coryd.dev/{{ globals.feed_image }}</url>
<width>144</width>
<height>144</height>
</image>

View file

@ -1,9 +1,9 @@
<section class="main-title">
<h1>
{% if page.url != '/' %}
<a href="/" tabindex="0">{{ meta.siteName }}</a>
<a href="/" tabindex="0">{{ globals.site_name }}</a>
{% else %}
{{ meta.siteName }}
{{ globals.site_name }}
{% endif %}
</h1>
{% render "partials/nav/menu.liquid", page:page, nav:nav %}

View file

@ -17,7 +17,7 @@
<a href="{{ post.slug }}">
<h3>{{ post.title }}</h3>
</a>
<span class="p-author h-card hidden">{{ meta.siteName }}</span>
<span class="p-author h-card hidden">{{ globals.siteName }}</span>
<div class="p-summary hidden">{{ post.data.post_excerpt }}</div>
{{ post.description | markdown | truncate: 300 }}
</article>

View file

@ -1,155 +1,18 @@
<div class="badge-grid">
<a href="https://11ty.dev">
<img
srcset="
https://cdn.coryd.dev/assets/badges/eleventy.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/eleventy.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/eleventy.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
{% for badge in badges %}
<a href="{{ badge.url }}">
<img srcset="
https://cdn.coryd.dev/{{ badge.image }}?class=w50 50w,
https://cdn.coryd.dev/{{ badge.image }}?class=w100 100w,
https://cdn.coryd.dev/{{ badge.image }}?class=w200 200w,
" sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/eleventy.png?class=w200"
alt="Made with 11ty"
loading="lazy"
704px" src="https://cdn.coryd.dev/{{ badge.image }}?class=w200" alt="{{ badge.image_alt }}" loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://social.lol/@cory">
<img
srcset="
https://cdn.coryd.dev/assets/badges/mastodon.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/mastodon.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/mastodon.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/mastodon.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://www.buymeacoffee.com/cory">
<img
srcset="
https://cdn.coryd.dev/assets/badges/buymeacoffee.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/buymeacoffee.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/buymeacoffee.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/buymeacoffee.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://github.com/cdransf">
<img
srcset="
https://cdn.coryd.dev/assets/badges/github.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/github.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/github.png?class=w200 200w,
https://cdn.coryd.dev/assets/badges/github.png?class=w200 704w
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/github.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://github.com/ai-robots-txt/ai.robots.txt">
<img
srcset="
https://cdn.coryd.dev/assets/badges/notarobot.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/notarobot.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/notarobot.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/notarobot.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://validator.w3.org">
<img
srcset="
https://cdn.coryd.dev/assets/badges/validhtml5.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/validhtml5.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/validhtml5.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/validhtml5.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://www.w3.org/Style/CSS/Overview.en.html">
<img
srcset="
https://cdn.coryd.dev/assets/badges/validcss.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/validcss.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/validcss.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/validcss.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
<a href="https://coryd.dev/feeds">
<img
srcset="
https://cdn.coryd.dev/assets/badges/validrss.png??class=w50 50w,
https://cdn.coryd.dev/assets/badges/validrss.png?class=w100 100w,
https://cdn.coryd.dev/assets/badges/validrss.png?class=w200 200w,
"
sizes="(max-width: 450px) 88px,
(max-width: 850px) 176px,
(max-width: 1000px) 352px,
704px"
src="https://cdn.coryd.dev/assets/badges/validrss.png?class=w200"
alt="Made with 11ty"
loading="lazy"
decoding="async"
width="88"
height="31"
/>
</a>
</div>
{% endfor %}
</div>

View file

@ -2,16 +2,16 @@
<div class="flex-centered justify-centered">
<img
srcset="
https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w200 200w,
https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w400 400w,
https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w800 800w,
https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w1600 1600w
https://cdn.coryd.dev/{{ logo }}?class=w200 200w,
https://cdn.coryd.dev/{{ logo }}?class=w400 400w,
https://cdn.coryd.dev/{{ logo }}?class=w800 800w,
https://cdn.coryd.dev/{{ logo }}?class=w1600 1600w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
(max-width: 1000px) 800px,
1600px"
src="https://cdn.coryd.dev/assets/webrings/theclaw.png?class=1600"
src="https://cdn.coryd.dev/{{ logo }}?class=1600"
alt="The Claw Webring"
loading="lazy"
decoding="async"

View file

@ -154,7 +154,8 @@ a {
align-items: center;
& + .page-header,
& + .music-chart {
& + .music-chart,
& + .media-grid {
margin-top: var(--sizing-base);
}
}

View file

@ -7,7 +7,7 @@ eleventyExcludeFromCollections: true
{% for page in collections.all %}
{% if not page.data.draft %}
<url>
<loc>{{ meta.url }}{{ page.url }}</loc>
<loc>{{ globals.url }}{{ page.url }}</loc>
<lastmod>{{ page.date | isoDateOnly: '-' }}</lastmod>
<changefreq>{%- if page.data.changeFreq -%}{{ page.data.changeFreq }}{%- else -%}monthly{%- endif -%}</changefreq>
<priority>{%- if page.data.priority -%}{{ page.data.priority }}{%- else -%}0.5{%- endif %}</priority>

View file

@ -3,20 +3,20 @@ title: 404
description: What kind of idiots do you have working here? Hurry up and skip out on the room service bill!
layout: default
permalink: /404.html
image: https://cdn.coryd.dev/assets/404.jpg
image: https://cdn.coryd.dev/{{ globals.page_404 }}
---
<img
srcset="
https://cdn.coryd.dev/assets/404.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/404.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/404.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/404.jpg?class=bannerlg 2048w
https://cdn.coryd.dev/{{ globals.page_404 }}?class=bannersm 256w,
https://cdn.coryd.dev/{{ globals.page_404 }}?class=bannermd 512w,
https://cdn.coryd.dev/{{ globals.page_404 }}?class=bannerbase 1024w,
https://cdn.coryd.dev/{{ globals.page_404 }}?class=bannerlg 2048w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
(max-width: 1000px) 1024px,
2048px"
src="https://cdn.coryd.dev/assets/404.jpg?class=bannerlg"
src="https://cdn.coryd.dev/{{ globals.page_404 }}?class=bannerlg"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -3,20 +3,20 @@ title: Broken
description: Hey! That's broken. Try again later.
layout: default
permalink: /broken.html
image: https://cdn.coryd.dev/assets/broken.jpg
image: https://cdn.coryd.dev/{{ globals.page_broken }}
---
<img
srcset="
https://cdn.coryd.dev/assets/broken.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/broken.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/broken.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/broken.jpg?class=bannerlg 2048w
https://cdn.coryd.dev/{{ globals.page_broken }}?class=bannersm 256w,
https://cdn.coryd.dev/{{ globals.page_broken }}?class=bannermd 512w,
https://cdn.coryd.dev/{{ globals.page_broken }}?class=bannerbase 1024w,
https://cdn.coryd.dev/{{ globals.page_broken }}?class=bannerlg 2048w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
(max-width: 1000px) 1024px,
2048px"
src="https://cdn.coryd.dev/assets/broken.jpg?class=bannerlg"
src="https://cdn.coryd.dev/{{ globals.page_broken }}?class=bannerlg"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -3,20 +3,20 @@ title: Not allowed
description: Sometimes mildly inconvenient things happen to people. That's not allowed.
layout: default
permalink: /not-allowed.html
image: https://cdn.coryd.dev/assets/not-allowed.jpg
image: https://cdn.coryd.dev/{{ globals.page_not_allowed }}
---
<img
srcset="
https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannerlg 2048w
https://cdn.coryd.dev/{{ globals.page_not_allowed }}?class=bannersm 256w,
https://cdn.coryd.dev/{{ globals.page_not_allowed }}?class=bannermd 512w,
https://cdn.coryd.dev/{{ globals.page_not_allowed }}?class=bannerbase 1024w,
https://cdn.coryd.dev/{{ globals.page_not_allowed }}?class=bannerlg 2048w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
(max-width: 1000px) 1024px,
2048px"
src="https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannerlg"
src="https://cdn.coryd.dev/{{ globals.page_not_allowed }}?class=bannerlg"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -3,20 +3,20 @@ title: Rate limit
description: Hey! Stop that. Try again later.
layout: default
permalink: /rate-limit.html
image: https://cdn.coryd.dev/assets/stop.jpg
image: https://cdn.coryd.dev/{{ globals.page_stop }}
---
<img
srcset="
https://cdn.coryd.dev/assets/stop.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/stop.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/stop.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/stop.jpg?class=bannerlg 2048w
https://cdn.coryd.dev/{{ globals.page_stop }}?class=bannersm 256w,
https://cdn.coryd.dev/{{ globals.page_stop }}?class=bannermd 512w,
https://cdn.coryd.dev/{{ globals.page_stop }}?class=bannerbase 1024w,
https://cdn.coryd.dev/{{ globals.page_stop }}?class=bannerlg 2048w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
(max-width: 1000px) 1024px,
2048px"
src="https://cdn.coryd.dev/assets/stop.jpg?class=bannerlg"
src="https://cdn.coryd.dev/{{ globals.page_stop }}?class=bannerlg"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -8,19 +8,19 @@ permalink: /about.html
{%- assign show = tv.recentlyWatched | first -%}
<div class="avatar-wrapper flex-centered">
<div class="interior">
{%- capture about_alt -%}{{ meta.siteName }} - image by David Neal / @reverentgeek{%- endcapture -%}
{%- capture about_alt -%}{{ globals.siteName }} - image by David Neal / @reverentgeek{%- endcapture -%}
<img
srcset="
https://cdn.coryd.dev/assets/avatar-transparent.png?class=squaresm 200w,
https://cdn.coryd.dev/assets/avatar-transparent.png?class=squaremd 400w,
https://cdn.coryd.dev/assets/avatar-transparent.png?class=squarebase 800w,
https://cdn.coryd.dev/assets/avatar-transparent.png?class=squarelg 1200w
https://cdn.coryd.dev/{{ globals.about }}?class=squaresm 200w,
https://cdn.coryd.dev/{{ globals.about }}?class=squaremd 400w,
https://cdn.coryd.dev/{{ globals.about }}?class=squarebase 800w,
https://cdn.coryd.dev/{{ globals.about }}?class=squarelg 1200w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
(max-width: 1000px) 800px,
1200px"
src="https://cdn.coryd.dev/assets/avatar-transparent.png?class=squarelg"
src="https://cdn.coryd.dev/{{ globals.about }}?class=squarelg"
alt="{{ about_alt }}"
loading="eager"
decoding="async"
@ -39,4 +39,4 @@ I tend to write about whatever strikes me, with a focus on development, technolo
[You can also see what I'm doing now](/now), [take a look at the links I've shared recently](/links) or [check out the webrings I'm a member of](/webrings).
{% render "partials/widgets/badge-grid.liquid" %}
{% render "partials/widgets/badge-grid.liquid", badges: badges %}

View file

@ -19,7 +19,7 @@ permalink: "/posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
<a href="{{ post.slug }}">
<h3>{{ post.title }}</h3>
</a>
<span class="p-author h-card hidden">{{ meta.siteName }}</span>
<span class="p-author h-card hidden">{{ globals.site_name }}</span>
<div class="p-summary hidden">{{ post.description }}</div>
<p>{{ post.description }}</p>
</article>

View file

@ -15,10 +15,29 @@ schema: blog
</time>
</div>
<h2 class="p-name">{{ post.title }}</h2>
<span class="p-author h-card hidden">{{ meta.author }}</span>
<span class="p-author h-card hidden">{{ globals.author }}</span>
<div class="p-summary hidden">{{ post.description }}</div>
<div class="e-content">
{% render "partials/banners/old-post.liquid", date:post.date %}
{%- if post.image -%}
<img
srcset="
https://cdn.coryd.dev/{{ post.image }}?class=w200 200w,
https://cdn.coryd.dev/{{ post.image }}?class=w400 400w,
https://cdn.coryd.dev/{{ post.image }}?class=w800 800w,
https://cdn.coryd.dev/{{ post.image }}?class=w1600 1600w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
(max-width: 1000px) 800px,
1600px"
src="https://cdn.coryd.dev/{{ post.image }}?class=w1600"
alt="{{ post.image_alt }}"
class="image-banner"
loading="lazy"
decoding="async"
/>
{%- endif -%}
{{ post.content | markdown }}
{% render "partials/posts/blocks.liquid", blocks:post.blocks %}
</div>

View file

@ -15,16 +15,16 @@ schema: show
<article class="watching-focus">
<img
srcset="
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannersm 256w,
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannermd 512w,
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannerlg 2048w
https://cdn.coryd.dev/{{ show.backdrop }}?class=bannersm 256w,
https://cdn.coryd.dev/{{ show.backdrop }}?class=bannermd 512w,
https://cdn.coryd.dev/{{ show.backdrop }}?class=bannerbase 1024w,
https://cdn.coryd.dev/{{ show.backdrop }}?class=bannerlg 2048w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
(max-width: 1000px) 1024px,
2048px"
src="https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannerlg"
src="https://cdn.coryd.dev/{{ show.backdrop }}?class=bannerlg"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -11,7 +11,7 @@ description: How to contact me.
<ul>
<li>Ping me on <a href="https://social.lol/@cory">Mastodon</a></li>
<li>Message me on Signal or iMessage (if you have my phone number)</li>
<li><a href="mailto:{{ meta.email }}">Email me directly</a> if you have a client set up to use <code>mailto:</code> links</li>
<li><a href="mailto:{{ globals.email }}">Email me directly</a> if you have a client set up to use <code>mailto:</code> links</li>
<li>File an issue on the appropriate repo over at <a href="https://github.com/cdransf">GitHub</a></li>
</ul>
</div>

View file

@ -8,6 +8,6 @@ description: Webrings are awesome! These are the ones I'm a member of.
[Webrings](https://en.wikipedia.org/wiki/Webring) are _awesome_. I'm a member of a few that follow. Check them out!
{% render "webrings/the-claw.liquid" %}
{% render "webrings/the-claw.liquid", logo: globals.logo_the_claw %}
<hr />
{% render "webrings/css-joy.liquid" %}