fix(scheduled_shows.sql): add missing metadata

This commit is contained in:
Cory Dransfeldt 2025-06-04 16:37:50 -07:00
parent a739ddbaa9
commit bcb89ceb95
No known key found for this signature in database
3 changed files with 42 additions and 4 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "8.3.1", "version": "8.3.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "8.3.1", "version": "8.3.2",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"minisearch": "^7.1.2", "minisearch": "^7.1.2",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "8.3.1", "version": "8.3.2",
"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",
"engines": { "engines": {

View file

@ -52,6 +52,25 @@ SELECT json_build_object(
s.year::text s.year::text
) )
) AS grid, ) AS grid,
json_build_object(
'title', CONCAT('Show • ', s.title, '', globals.site_name),
'description', LEFT(
regexp_replace(
regexp_replace(
regexp_replace(s.description, E'[*_`~#>-]', '', 'g'),
E'\\[(.*?)\\]\\((.*?)\\)', E'\\1', 'g'
),
E'!\\[(.*?)\\]\\((.*?)\\)', '', 'g'
),
250
),
'open_graph_image', CASE
WHEN df_backdrop.filename_disk IS NOT NULL AND df_backdrop.filename_disk != '' AND df_backdrop.filename_disk != '/' THEN CONCAT('/', df_backdrop.filename_disk)
ELSE NULL
END,
'url', CONCAT(globals.url, s.slug),
'type', 'scheduled_show'
) AS metadata,
CASE CASE
WHEN ( WHEN (
SELECT se.air_date SELECT se.air_date
@ -141,7 +160,26 @@ SELECT json_build_object(
), ),
s.year::text s.year::text
) )
) AS grid ) AS grid,
json_build_object(
'title', CONCAT('Show • ', s.title, '', globals.site_name),
'description', LEFT(
regexp_replace(
regexp_replace(
regexp_replace(s.description, E'[*_`~#>-]', '', 'g'),
E'\\[(.*?)\\]\\((.*?)\\)', E'\\1', 'g'
),
E'!\\[(.*?)\\]\\((.*?)\\)', '', 'g'
),
250
),
'open_graph_image', CASE
WHEN df_backdrop.filename_disk IS NOT NULL AND df_backdrop.filename_disk != '' AND df_backdrop.filename_disk != '/' THEN CONCAT('/', df_backdrop.filename_disk)
ELSE NULL
END,
'url', CONCAT(globals.url, s.slug),
'type', 'scheduled_show'
) AS metadata
FROM shows s FROM shows s
LEFT JOIN directus_files df_art ON s.art = df_art.id LEFT JOIN directus_files df_art ON s.art = df_art.id
LEFT JOIN directus_files df_backdrop ON s.backdrop = df_backdrop.id LEFT JOIN directus_files df_backdrop ON s.backdrop = df_backdrop.id