diff --git a/workers/dynamic-pages/index.js b/workers/dynamic-pages/index.js
index b19ab248..0a1aa7a0 100644
--- a/workers/dynamic-pages/index.js
+++ b/workers/dynamic-pages/index.js
@@ -34,7 +34,6 @@ const parseCountryField = (countryField) => {
return countries.map(getCountryName).join(', ')
}
-
const generateMediaLinks = (data, type, count = 10) => {
if (!data || !type) return ''
@@ -74,6 +73,8 @@ async function fetchDataByUrl(supabase, table, url) {
return data
}
+const formatDate = (date) => new Date(date).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })
+
async function fetchGlobals(supabase) {
const { data, error } = await supabase.from('optimized_globals').select('*').single()
if (error) {
@@ -87,7 +88,7 @@ function generateMetadata(data, type, globals) {
let title = globals['site_name']
let description = data.description || globals.site_description
const canonicalUrl = data.url ? `${globals.url}${data.url}` : globals.url
- const ogImage = `${globals.cdn_url}${data.image || globals.avatar}?class=w800`
+ const ogImage = `${globals['cdn_url']}${data.image || globals.avatar}?class=w800`
description = convert(truncateHtml(md.render(description), 100, {
byWords: true,
@@ -198,14 +199,14 @@ function generateWatchingHTML(media, globals, type) {
${ICON_MAP.heart} This is one of my favorite ${label}s!
${md.render(media.review)}
` : ''} ${generateAssociatedMediaHTML(media)} @@ -250,7 +251,7 @@ function generateConcertModal(concert) { return `