The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
capitalize type of page for og image
Jonathan Summers-Muir8d25c826994b
diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsxindex 66772a595a8..aa0bc040e92 100644--- a/apps/docs/layouts/guides/index.tsx+++ b/apps/docs/layouts/guides/index.tsx@@ -64,10 +64,18 @@ const Layout: FC<Props> = (props) => {const hasTableOfContents = tocList.length > 0+ // page type, ie, Auth, Database, Storage etcconst ogPageType = asPath.split('/')[2]-+ const ogPageTypeSplit = ogPageType.split(' ')+ // capitalize each word for page type+ ogPageTypeSplit+ .map((word) => {+ return word[0].toUpperCase() + word.substring(1)+ })+ .join(' ')+ // open graph image url constructorconst ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${- ogPageType ? `&type=${ogPageType}` : ''+ ogPageTypeSplit ? `&type=${ogPageTypeSplit}` : ''}&title=${encodeURIComponent(props.meta?.title)}&description=${encodeURIComponent(props.meta?.description)}`diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsxindex 4aa3201e2b9..7d1da80d098 100644--- a/apps/docs/pages/_app.tsx+++ b/apps/docs/pages/_app.tsx@@ -67,11 +67,11 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {<Head><metaproperty="og:image"- content={`https://supabase.com${basePath}/img/supabase-og-image.png`}+ content={`https://supabase.com${router.basePath}/img/supabase-og-image.png`}/><metaname="twitter:image"- content={`https://supabase.com${basePath}/img/supabase-og-image.png`}+ content={`https://supabase.com${router.basePath}/img/supabase-og-image.png`}/></Head><DefaultSeo