From aebbdf33d291dc94f8e9cd17d756a7e69a0d7816 Mon Sep 17 00:00:00 2001 From: Isaiah Hamilton Date: Tue, 7 Mar 2023 21:26:08 -0500 Subject: [PATCH 1/4] fix: encodeURIComponent --- apps/docs/layouts/guides/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsx index 2895705bc55..107ae5753df 100644 --- a/apps/docs/layouts/guides/index.tsx +++ b/apps/docs/layouts/guides/index.tsx @@ -67,11 +67,10 @@ const Layout: FC = (props) => { // page type, ie, Auth, Database, Storage etc const ogPageType = asPath.split('/')[2] // open graph image url constructor - const ogImageUrl = encodeURIComponent( + const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ ogPageType ? `&type=${ogPageType}` : '' - }&title=${props.meta?.title}&description=${props.meta?.description}` - ) + }&title=${encodeURIComponent(props.meta?.title)}&description=${encodeURIComponent(props.meta?.description)}` return ( <> From 8838800e298a3cf54b850b252d2dc2e44cdd9770 Mon Sep 17 00:00:00 2001 From: Isaiah Hamilton Date: Tue, 7 Mar 2023 21:27:47 -0500 Subject: [PATCH 2/4] run prettier --- apps/docs/layouts/guides/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsx index 107ae5753df..d6f245d989e 100644 --- a/apps/docs/layouts/guides/index.tsx +++ b/apps/docs/layouts/guides/index.tsx @@ -67,10 +67,11 @@ const Layout: FC = (props) => { // page type, ie, Auth, Database, Storage etc const ogPageType = asPath.split('/')[2] // open graph image url constructor - const ogImageUrl = - `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ - ogPageType ? `&type=${ogPageType}` : '' - }&title=${encodeURIComponent(props.meta?.title)}&description=${encodeURIComponent(props.meta?.description)}` + const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ + ogPageType ? `&type=${ogPageType}` : '' + }&title=${encodeURIComponent(props.meta?.title)}&description=${encodeURIComponent( + props.meta?.description + )}` return ( <> From 171710127226d24480be18966203e828946340ae Mon Sep 17 00:00:00 2001 From: Isaiah Hamilton Date: Mon, 20 Mar 2023 16:20:30 -0400 Subject: [PATCH 3/4] fix: og image link --- apps/docs/layouts/guides/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsx index d6f245d989e..3ed66fdc7fe 100644 --- a/apps/docs/layouts/guides/index.tsx +++ b/apps/docs/layouts/guides/index.tsx @@ -67,11 +67,7 @@ const Layout: FC = (props) => { // page type, ie, Auth, Database, Storage etc const ogPageType = asPath.split('/')[2] // open graph image url constructor - const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ - ogPageType ? `&type=${ogPageType}` : '' - }&title=${encodeURIComponent(props.meta?.title)}&description=${encodeURIComponent( - props.meta?.description - )}` + const ogImageUrl = encodeURI(`https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ogPageType ? `&type=${ogPageType}` : ''}&title=${props.meta?.title}&description=${props.meta?.description}`) return ( <> From 0d022a191e4f34e066eae7cf8947503f4964986e Mon Sep 17 00:00:00 2001 From: Isaiah Hamilton Date: Mon, 20 Mar 2023 16:23:06 -0400 Subject: [PATCH 4/4] run prettier --- apps/docs/layouts/guides/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsx index 3ed66fdc7fe..e24008fe864 100644 --- a/apps/docs/layouts/guides/index.tsx +++ b/apps/docs/layouts/guides/index.tsx @@ -67,7 +67,11 @@ const Layout: FC = (props) => { // page type, ie, Auth, Database, Storage etc const ogPageType = asPath.split('/')[2] // open graph image url constructor - const ogImageUrl = encodeURI(`https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ogPageType ? `&type=${ogPageType}` : ''}&title=${props.meta?.title}&description=${props.meta?.description}`) + const ogImageUrl = encodeURI( + `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${ + ogPageType ? `&type=${ogPageType}` : '' + }&title=${props.meta?.title}&description=${props.meta?.description}` + ) return ( <>