From 9a25aca2d724e6846caaa30847112fdc20e8cb95 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Nov 2024 11:39:10 -0500 Subject: [PATCH 1/2] fix: invalid og:image for all areas --- src/app/(default)/area/[[...slug]]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(default)/area/[[...slug]]/page.tsx b/src/app/(default)/area/[[...slug]]/page.tsx index cb505f0e9..3a45406cc 100644 --- a/src/app/(default)/area/[[...slug]]/page.tsx +++ b/src/app/(default)/area/[[...slug]]/page.tsx @@ -199,7 +199,7 @@ export async function generateMetadata ({ params }: PageWithCatchAllUuidProps): const name = sanitizeName(areaName) - const previewImage = media.length > 0 ? `${CLIENT_CONFIG.CDN_BASE_URL}/${media[0].mediaUrl}?w=1200q=75` : null + const previewImage = media.length > 0 ? `${CLIENT_CONFIG.CDN_BASE_URL}${media[0].mediaUrl}?w=1200&q=75` : null const description = `Community knowledge • ${wall}${name}` From bd3557ce828d831d1f003c76ccd9a4c2e713e59e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 8 Nov 2024 11:48:45 -0500 Subject: [PATCH 2/2] fix: extra slash in climb page SEO image --- src/js/hooks/seo/useClimbSeo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/hooks/seo/useClimbSeo.ts b/src/js/hooks/seo/useClimbSeo.ts index d58f6a0aa..f77f52d4a 100644 --- a/src/js/hooks/seo/useClimbSeo.ts +++ b/src/js/hooks/seo/useClimbSeo.ts @@ -48,5 +48,5 @@ export const useClimbSeo = ({ climb }: ClimbSeoProps): SeoHookType => { */ const getRandomPreviewImages = (list: MediaWithTags[]): string[] => { const shortList = shuffle(list.slice(0, 10)) // shuffle the first 10 - return shortList.slice(0, 4).map(image => (`${CLIENT_CONFIG.CDN_BASE_URL}/${image.mediaUrl}?w=1200&ch=630&cy=center&format=jpg&q=85`)) + return shortList.slice(0, 4).map(image => (`${CLIENT_CONFIG.CDN_BASE_URL}${image.mediaUrl}?w=1200&ch=630&cy=center&format=jpg&q=85`)) }