Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

update customers og images (#26954)

Francesco Sansalvadore44a29c184f0b
diff --git a/apps/www/_customers/good-tape.mdx b/apps/www/_customers/good-tape.mdx
index feb43dec89a..683892a8548 100644
--- a/apps/www/_customers/good-tape.mdx
+++ b/apps/www/_customers/good-tape.mdx
@@ -10,8 +10,8 @@ author: paul_copplestone
author_title: CEO and Cofounder
author_url: https://github.com/kiwicopple
author_image_url: https://avatars2.githubusercontent.com/u/10214025?s=400&u=c6775be2ae667e2acae3ccd347fed62bb3f5b3e7&v=4
-logo: /images/customers/logos/goodtape.png
-logo_inverse: /images/customers/logos/light/goodtape.png
+logo: /images/customers/logos/good-tape.png
+logo_inverse: /images/customers/logos/light/good-tape.png
og_image: /images/customers/og/goodtape.jpg
tags:
- supabase
diff --git a/apps/www/data/CustomerStories.ts b/apps/www/data/CustomerStories.ts
index 42af4204d23..b89dcd73cb7 100644
--- a/apps/www/data/CustomerStories.ts
+++ b/apps/www/data/CustomerStories.ts
@@ -24,9 +24,9 @@ export const data = [
'Good Tape migrates to Supabase managed Postgres and Authentication and achieves database efficiency and a 60% cost reduction',
description:
"Explore how Good Tape achieved remarkable database efficiency and reduced costs by 60% through their successful migration to Supabase's managed services.",
- imgUrl: 'images/customers/logos/goodtape.png',
- logo: '/images/customers/logos/goodtape.png',
- logo_inverse: '/images/customers/logos/light/goodtape.png',
+ imgUrl: 'images/customers/logos/good-tape.png',
+ logo: '/images/customers/logos/good-tape.png',
+ logo_inverse: '/images/customers/logos/light/good-tape.png',
organization: 'Good Tape',
url: '/customers/good-tape',
path: '/customers/good-tape',
diff --git a/apps/www/pages/customers/[slug].tsx b/apps/www/pages/customers/[slug].tsx
index cd97bbc943e..74fe52e4db7 100644
--- a/apps/www/pages/customers/[slug].tsx
+++ b/apps/www/pages/customers/[slug].tsx
@@ -62,15 +62,30 @@ export async function getStaticProps({ params }: any) {
}
function CaseStudyPage(props: any) {
- const content = props.blog.content
+ const {
+ about,
+ company_url,
+ content,
+ date,
+ description,
+ logo,
+ meta_description,
+ meta_title,
+ misc,
+ name,
+ slug,
+ title,
+ } = props.blog
+
+ const ogImageUrl = encodeURI(
+ `${process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:54321' : 'https://obuldanrptloktxcffvn.supabase.co'}/functions/v1/og-images?site=customers&customer=${slug}&title=${meta_title ?? title}`
+ )
const meta = {
- title: props.blog.meta_title ?? `${props.blog.name} | Supabase Customer Stories`,
- description: props.blog.meta_description ?? props.blog.description,
- image:
- `${SITE_ORIGIN}${props.blog.og_image}` ??
- `${SITE_ORIGIN}/images/customers/og/customer-stories.jpg`,
- url: `${SITE_ORIGIN}/customers/${props.blog.slug}`,
+ title: meta_title ?? `${name} | Supabase Customer Stories`,
+ description: meta_description ?? description,
+ image: ogImageUrl ?? `${SITE_ORIGIN}/images/customers/og/customer-stories.jpg`,
+ url: `${SITE_ORIGIN}/customers/${slug}`,
}
return (
@@ -86,7 +101,7 @@ function CaseStudyPage(props: any) {
//
// to do: add expiration and modified dates
// https://github.com/garmeeh/next-seo#article
- publishedTime: props.blog.date,
+ publishedTime: date,
},
images: [
{
@@ -126,12 +141,8 @@ function CaseStudyPage(props: any) {
<Link href="/customers" className="text-brand hover:text-brand-600 mb-2 mt-0">
Customer Stories
</Link>
- <h1 className="text-foreground text-4xl font-semibold xl:text-5xl">
- {props.blog.title}
- </h1>
- <h2 className="text-foreground text-xl xl:text-2xl">
- {props.blog.description}
- </h2>
+ <h1 className="text-foreground text-4xl font-semibold xl:text-5xl">{title}</h1>
+ <h2 className="text-foreground text-xl xl:text-2xl">{description}</h2>
</div>
<div className="grid grid-cols-12 prose max-w-none gap-8 lg:gap-20">
@@ -141,37 +152,41 @@ function CaseStudyPage(props: any) {
<div className="relative h-16 w-32 lg:mt-5">
<Image
fill
- src={`${props.blog.logo}`}
- alt={`${props.blog.title} logo`}
+ src={logo}
+ alt={`${title} logo`}
+ priority
+ placeholder="blur"
+ blurDataURL="/images/blur.png"
+ draggable={false}
className="
- bg-no-repeat
- object-left
- object-contain
- m-0
-
- [[data-theme*=dark]_&]:brightness-200
- [[data-theme*=dark]_&]:contrast-0
- [[data-theme*=dark]_&]:filter
- "
+ bg-no-repeat
+ object-left
+ object-contain
+ m-0
+
+ [[data-theme*=dark]_&]:brightness-200
+ [[data-theme*=dark]_&]:contrast-0
+ [[data-theme*=dark]_&]:filter
+ "
/>
</div>
<div className="flex flex-col space-y-2">
<span className="text-foreground-lighter">About</span>
- <p>{props.blog.about}</p>
+ <p>{about}</p>
<span className="not-prose ">
<a
- href={props.blog.company_url}
+ href={company_url}
className="flex cursor-pointer items-center space-x-1 transition-opacity text-foreground-lightround-ligtext-foreground-light:text-foreground-light"
target="_blank"
>
- <span>{props.blog.company_url}</span>
+ <span>{company_url}</span>
<IconExternalLink size={14} />
</a>
</span>
</div>
- {props.blog.misc.map((x: any) => {
+ {misc?.map((x: any) => {
return (
<div className="flex flex-col gap-0">
<span className="text-foreground-lighter">{x.label}</span>
diff --git a/apps/www/public/customers-rss.xml b/apps/www/public/customers-rss.xml
index 3ddf8d8eabd..61be78e34d1 100644
--- a/apps/www/public/customers-rss.xml
+++ b/apps/www/public/customers-rss.xml
@@ -5,105 +5,105 @@
<link>https://supabase.com</link>
<description>Latest news from Supabase</description>
<language>en</language>
- <lastBuildDate>Wed, 29 Nov 2023 16:00:00 GMT</lastBuildDate>
+ <lastBuildDate>Wed, 29 Nov 2023 23:00:00 GMT</lastBuildDate>
<atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/customers/shotgun</guid>
<title>Supabase migration delivers an 83% reduction in data infrastructure costs for Shotgun</title>
<link>https://supabase.com/customers/shotgun</link>
<description>Discover how Shotgun, an event ticketing platform with over 3 million users, reduced costs and consolidated systems through migration to Supabase.</description>
- <pubDate>Wed, 29 Nov 2023 16:00:00 GMT</pubDate>
+ <pubDate>Wed, 29 Nov 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/next-door-lending</guid>
<title>How Next Door Lending leveraged Supabase to become a top 10 mortgage broker</title>
<link>https://supabase.com/customers/next-door-lending</link>
<description>Discover how Supabase empowered NextDoorLending to move quickly and scale as required, leading to their surpassing other mortgage brokers and expanding their business.</description>
- <pubDate>Tue, 07 Nov 2023 16:00:00 GMT</pubDate>
+ <pubDate>Tue, 07 Nov 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/good-tape</guid>
<title>Good Tape migrates to Supabase managed Postgres and Authentication and achieves database efficiency and a 60% cost reduction.</title>
<link>https://supabase.com/customers/good-tape</link>
<description>Explore how Good Tape achieved remarkable database efficiency and reduced costs by 60% through their successful migration to Supabase&apos;s managed services.</description>
- <pubDate>Mon, 30 Oct 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 30 Oct 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/pebblely</guid>
<title>Scaling securely: one million users in 7 months with Supabase Auth</title>
<link>https://supabase.com/customers/pebblely</link>
<description>Learn how Pebblely, an AI image generation company, used Supabase Auth to handle Single Sign On for their rapidly growing user base.</description>
- <pubDate>Thu, 28 Sep 2023 16:00:00 GMT</pubDate>
+ <pubDate>Thu, 28 Sep 2023 22:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/chatbase</guid>
<title>Bootstrapped founder builds an AI app with Supabase and scales to $1M in 5 months</title>
<link>https://supabase.com/customers/chatbase</link>
<description>How Yasser leveraged Supabase to build Chatbase and became one of the most successful single-founder AI products.</description>
- <pubDate>Tue, 05 Sep 2023 16:00:00 GMT</pubDate>
+ <pubDate>Tue, 05 Sep 2023 22:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/quivr</guid>
<title>Quivr launch 5,000 Vector databases on Supabase.</title>
<link>https://supabase.com/customers/quivr</link>
<description>Learn how one of the most popular Generative AI projects uses Supabase as their Vector Store.</description>
- <pubDate>Mon, 04 Sep 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 04 Sep 2023 22:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/berriai</guid>
<title>Berri AI boosts productivity by migrating from AWS RDS to Supabase Vector</title>
<link>https://supabase.com/customers/berriai</link>
<description>Learn how Berri AI overcame challenges with self-hosting their vector database on AWS RDS and successfully migrated to Supabase.</description>
- <pubDate>Mon, 05 Jun 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 05 Jun 2023 22:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/markprompt</guid>
<title>Markprompt and Supabase - GDPR-compliant AI chatbots for docs and websites.</title>
<link>https://supabase.com/customers/markprompt</link>
<description>AI-powered chatbot platform, Markprompt, empowers developers to deliver efficient and GDPR-compliant prompt experiences on top of their content, by leveraging Supabase&apos;s secure and privacy-focused vector database and authentication solutions.</description>
- <pubDate>Tue, 16 May 2023 16:00:00 GMT</pubDate>
+ <pubDate>Tue, 16 May 2023 22:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/mendableai</guid>
<title>Mendable switches from Pinecone to Supabase Vector for PostgreSQL vector embeddings.</title>
<link>https://supabase.com/customers/mendableai</link>
<description>How Mendable boosts efficiency and accuracy of chat powered search for documentation using Supabase Vector.</description>
- <pubDate>Thu, 04 May 2023 16:00:00 GMT</pubDate>
+ <pubDate>Thu, 04 May 2023 22:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/happyteams</guid>
<title>HappyTeams unlocks better performance and reduces cost with Supabase.</title>
<link>https://supabase.com/customers/happyteams</link>
<description>How a bootstrapped startup migrated from Heroku to Supabase in 30 minutes and never looked back.</description>
- <pubDate>Wed, 15 Feb 2023 16:00:00 GMT</pubDate>
+ <pubDate>Wed, 15 Feb 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/xendit</guid>
<title>Xendit use Supabase and create a full solution shipped to production in less than one week.</title>
<link>https://supabase.com/customers/xendit</link>
<description>As a payment processor, Xendit are responsible for verifying that all transactions are legal.</description>
- <pubDate>Mon, 13 Feb 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 13 Feb 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/replenysh</guid>
<title>Replenysh uses Supabase to implement OTP in less than 24 hours.</title>
<link>https://supabase.com/customers/replenysh</link>
<description>With Supabase, Replenysh gets a slick auth experience, reduces DevOps overhead, and continues to scale with Postgres.</description>
- <pubDate>Mon, 13 Feb 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 13 Feb 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/mobbin</guid>
<title>How Mobbin migrated 200,000 users from Firebase for a better authentication experience.</title>
<link>https://supabase.com/customers/mobbin</link>
<description>Mobbin helps over 200,000 creators globally search and view the latest design patterns from well-known apps.</description>
- <pubDate>Mon, 13 Feb 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 13 Feb 2023 23:00:00 GMT</pubDate>
</item>
<item>
<guid>https://supabase.com/customers/epsilon3</guid>
<title>Epsilon3 digitize paper-based procedures in the space industry using telemetry data, simplifying testing and operations.</title>
<link>https://supabase.com/customers/epsilon3</link>
<description>Epsilon3 uses Supabase to help teams execute secure and reliable operations in an industry where project spend runs into the billions.</description>
- <pubDate>Mon, 13 Feb 2023 16:00:00 GMT</pubDate>
+ <pubDate>Mon, 13 Feb 2023 23:00:00 GMT</pubDate>
</item>
</channel>
diff --git a/apps/www/public/images/customers/logos/blandai.png b/apps/www/public/images/customers/logos/blandai.png
new file mode 100644
index 00000000000..b1b6b615500
Binary files /dev/null and b/apps/www/public/images/customers/logos/blandai.png differ
diff --git a/apps/www/public/images/customers/logos/e2b.png b/apps/www/public/images/customers/logos/e2b.png
new file mode 100644
index 00000000000..ee83eacbe5e
Binary files /dev/null and b/apps/www/public/images/customers/logos/e2b.png differ
diff --git a/apps/www/public/images/customers/logos/good-tape.png b/apps/www/public/images/customers/logos/good-tape.png
new file mode 100644
index 00000000000..f2a48e8e25c
Binary files /dev/null and b/apps/www/public/images/customers/logos/good-tape.png differ
diff --git a/apps/www/public/images/customers/logos/goodtape.png b/apps/www/public/images/customers/logos/goodtape.png
deleted file mode 100644
index ec62488928d..00000000000
Binary files a/apps/www/public/images/customers/logos/goodtape.png and /dev/null differ
diff --git a/apps/www/public/images/customers/logos/light/blandai.png b/apps/www/public/images/customers/logos/light/blandai.png
new file mode 100644
index 00000000000..ff0a2bae085
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/blandai.png differ
diff --git a/apps/www/public/images/customers/logos/light/e2b.png b/apps/www/public/images/customers/logos/light/e2b.png
new file mode 100644
index 00000000000..e6c8c1eb192
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/e2b.png differ
diff --git a/apps/www/public/images/customers/logos/light/good-tape.png b/apps/www/public/images/customers/logos/light/good-tape.png
new file mode 100644
index 00000000000..360a8f3da9d
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/good-tape.png differ
diff --git a/apps/www/public/images/customers/logos/light/goodtape.png b/apps/www/public/images/customers/logos/light/goodtape.png
deleted file mode 100644
index 8e6521070a7..00000000000
Binary files a/apps/www/public/images/customers/logos/light/goodtape.png and /dev/null differ
diff --git a/apps/www/public/images/customers/logos/light/maergo.png b/apps/www/public/images/customers/logos/light/maergo.png
new file mode 100644
index 00000000000..0fd3441a4e5
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/maergo.png differ
diff --git a/apps/www/public/images/customers/logos/light/mdn.png b/apps/www/public/images/customers/logos/light/mdn.png
new file mode 100644
index 00000000000..9d51f91c371
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/mdn.png differ
diff --git a/apps/www/public/images/customers/logos/light/mendeable.png b/apps/www/public/images/customers/logos/light/mendeable.png
new file mode 100644
index 00000000000..6de3176520e
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/mendeable.png differ
diff --git a/apps/www/public/images/customers/logos/light/pwc.png b/apps/www/public/images/customers/logos/light/pwc.png
new file mode 100644
index 00000000000..f4bfae6079e
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/pwc.png differ
diff --git a/apps/www/public/images/customers/logos/light/record.png b/apps/www/public/images/customers/logos/light/record.png
new file mode 100644
index 00000000000..f6e7fbe3c67
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/record.png differ
diff --git a/apps/www/public/images/customers/logos/light/tinloof.png b/apps/www/public/images/customers/logos/light/tinloof.png
new file mode 100644
index 00000000000..36f165c137c
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/tinloof.png differ
diff --git a/apps/www/public/images/customers/logos/light/voypost.png b/apps/www/public/images/customers/logos/light/voypost.png
new file mode 100644
index 00000000000..435a7c90845
Binary files /dev/null and b/apps/www/public/images/customers/logos/light/voypost.png differ
diff --git a/apps/www/public/images/customers/logos/maergo.png b/apps/www/public/images/customers/logos/maergo.png
new file mode 100644
index 00000000000..c0525ab277b
Binary files /dev/null and b/apps/www/public/images/customers/logos/maergo.png differ
diff --git a/apps/www/public/images/customers/logos/mdn.png b/apps/www/public/images/customers/logos/mdn.png
new file mode 100644
index 00000000000..5b5c26969f0
Binary files /dev/null and b/apps/www/public/images/customers/logos/mdn.png differ
diff --git a/apps/www/public/images/customers/logos/mendeable.png b/apps/www/public/images/customers/logos/mendeable.png
new file mode 100644
index 00000000000..aaf904d33fc
Binary files /dev/null and b/apps/www/public/images/customers/logos/mendeable.png differ
diff --git a/apps/www/public/images/customers/logos/pwc.png b/apps/www/public/images/customers/logos/pwc.png
new file mode 100644
index 00000000000..a152b5e5288
Binary files /dev/null and b/apps/www/public/images/customers/logos/pwc.png differ
diff --git a/apps/www/public/images/customers/logos/record.png b/apps/www/public/images/customers/logos/record.png
new file mode 100644
index 00000000000..3663b6409e3
Binary files /dev/null and b/apps/www/public/images/customers/logos/record.png differ
diff --git a/apps/www/public/images/customers/logos/tinloof.png b/apps/www/public/images/customers/logos/tinloof.png
new file mode 100644
index 00000000000..f6e4756cc35
Binary files /dev/null and b/apps/www/public/images/customers/logos/tinloof.png differ
diff --git a/apps/www/public/images/customers/logos/voypost.png b/apps/www/public/images/customers/logos/voypost.png
new file mode 100644
index 00000000000..1e73a44cb19
Binary files /dev/null and b/apps/www/public/images/customers/logos/voypost.png differ
diff --git a/apps/www/public/images/customers/og/berriai.jpg b/apps/www/public/images/customers/og/berriai.jpg
deleted file mode 100644
index 4c03379e4cd..00000000000
Binary files a/apps/www/public/images/customers/og/berriai.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/chatbase.jpg b/apps/www/public/images/customers/og/chatbase.jpg
deleted file mode 100644
index 9f312779085..00000000000
Binary files a/apps/www/public/images/customers/og/chatbase.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/epsilon3.jpg b/apps/www/public/images/customers/og/epsilon3.jpg
deleted file mode 100644
index 7fc75be2411..00000000000
Binary files a/apps/www/public/images/customers/og/epsilon3.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/goodtape.jpg b/apps/www/public/images/customers/og/goodtape.jpg
deleted file mode 100644
index 7922cfb27a8..00000000000
Binary files a/apps/www/public/images/customers/og/goodtape.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/happyteams.jpg b/apps/www/public/images/customers/og/happyteams.jpg
deleted file mode 100644
index e14e0d77d31..00000000000
Binary files a/apps/www/public/images/customers/og/happyteams.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/markprompt.png b/apps/www/public/images/customers/og/markprompt.png
deleted file mode 100644
index a0491f6e480..00000000000
Binary files a/apps/www/public/images/customers/og/markprompt.png and /dev/null differ
diff --git a/apps/www/public/images/customers/og/mendable.jpg b/apps/www/public/images/customers/og/mendable.jpg
deleted file mode 100644
index 84250ee9a4e..00000000000
Binary files a/apps/www/public/images/customers/og/mendable.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/mobbin.jpg b/apps/www/public/images/customers/og/mobbin.jpg
deleted file mode 100644
index 4a27235671a..00000000000
Binary files a/apps/www/public/images/customers/og/mobbin.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/next-door-lending.jpg b/apps/www/public/images/customers/og/next-door-lending.jpg
deleted file mode 100644
index 001e908a2b9..00000000000
Binary files a/apps/www/public/images/customers/og/next-door-lending.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/pebblely.jpg b/apps/www/public/images/customers/og/pebblely.jpg
deleted file mode 100644
index 5cb2a8a121e..00000000000
Binary files a/apps/www/public/images/customers/og/pebblely.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/quivr.jpg b/apps/www/public/images/customers/og/quivr.jpg
deleted file mode 100644
index 4ea08da3c24..00000000000
Binary files a/apps/www/public/images/customers/og/quivr.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/replenysh.jpg b/apps/www/public/images/customers/og/replenysh.jpg
deleted file mode 100644
index 7b3524dbfba..00000000000
Binary files a/apps/www/public/images/customers/og/replenysh.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/shotgun.jpg b/apps/www/public/images/customers/og/shotgun.jpg
deleted file mode 100644
index 1dcd0f94bf3..00000000000
Binary files a/apps/www/public/images/customers/og/shotgun.jpg and /dev/null differ
diff --git a/apps/www/public/images/customers/og/xendit.jpg b/apps/www/public/images/customers/og/xendit.jpg
deleted file mode 100644
index c41586cd9a3..00000000000
Binary files a/apps/www/public/images/customers/og/xendit.jpg and /dev/null differ
diff --git a/supabase/functions/og-images/component/CustomerStories.tsx b/supabase/functions/og-images/component/CustomerStories.tsx
new file mode 100644
index 00000000000..27178c8734c
--- /dev/null
+++ b/supabase/functions/og-images/component/CustomerStories.tsx
@@ -0,0 +1,54 @@
+import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'
+
+type Props = {
+ title: string
+ customer: string
+}
+
+const STORAGE_URL =
+ 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/og-images'
+
+const CustomerStories = (props: Props) => {
+ const { title, customer } = props
+
+ const imageUrl = `https://supabase.com/images/customers/logos/light/${customer}.png`
+ const supabaseLogoUrl = `${STORAGE_URL}/customers/supabase-gradient-icon.svg?t=2024-06-01T16%3A09%3A05.507Z`
+
+ return (
+ <div
+ style={{
+ height: '100%',
+ width: '100%',
+ padding: '64px',
+ display: 'flex',
+ flexDirection: 'column',
+ color: '#B4B4B4', // foreground-light
+ backgroundColor: '#1C1C1C', // bg-default
+ fontFamily: 'Circular',
+ }}
+ >
+ <div tw="flex flex-row items-center justify-center top-0 mb-6">
+ <img src={supabaseLogoUrl} width="90px" height="90px" tw="mr-6" />
+ <p tw="text-[#FAFAFA] text-[30px] font-light">+</p>
+ {customer && (
+ <img
+ src={imageUrl}
+ tw="h-[100px] w-[200px] ml-10 opacity-90"
+ style={{
+ backgroundRepeat: 'no-repeat',
+ objectFit: 'contain',
+ }}
+ />
+ )}
+ </div>
+ <div tw="w-full top-0 flex flex-col justify-between mt-4">
+ <div tw="flex flex-col w-full">
+ <hr tw="border-b border-[#4D4D4D] w-full relative flex mb-10" />
+ <h1 tw="w-3/4 my-0 mb-2 text-[53px]">{!title ? 'Supabase' : title}</h1>
+ </div>
+ </div>
+ </div>
+ )
+}
+
+export default CustomerStories
diff --git a/supabase/functions/og-images/component/Docs.tsx b/supabase/functions/og-images/component/Docs.tsx
index 5b38579c085..c1bb2a87300 100644
--- a/supabase/functions/og-images/component/Docs.tsx
+++ b/supabase/functions/og-images/component/Docs.tsx
@@ -1,69 +1,82 @@
import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'
type Props = {
- type?: string | null
- title: string
- description: string
- icon?: string | null
+ type?: string | null
+ title: string
+ description: string
+ icon?: string | null
}
const Docs = (props: Props) => {
- const { type, title, description, icon } = props
+ const { type, title, description, icon } = props
- let typeName: string | undefined = type?.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase())
- let typeIcon: string | undefined = type?.toLowerCase()
+ let typeName: string | undefined = type
+ ?.replace(/-/g, ' ')
+ .replace(/\b\w/g, (l) => l.toUpperCase())
+ let typeIcon: string | undefined = type?.toLowerCase()
- if (type === 'functions' || type === 'function') {
- typeName = 'Edge Functions'
- } else if (type === 'self-hosting') {
- typeIcon = 'resources'
- } else if (type === 'cli') {
- typeName = 'CLI'
- typeIcon = 'reference-cli'
- }
-
- return (
- <div
- style={{
- height: '100%',
- width: '100%',
- display: 'flex',
- flexDirection: 'column',
- color: 'white',
- backgroundColor: '#1c1c1c',
- fontFamily: 'Circular',
- backgroundImage: 'url(https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/og-images/gradient.svg)',
- backgroundRepeat: 'no-repeat',
- }}
- >
- <div tw="flex flex-row items-center justify-center absolute top-[60px] left-[64px]">
- {icon && (
- <img src={`https://raw.githubusercontent.com/supabase/supabase/master/apps/docs/public/img/icons/${icon}-icon.svg`} width="50px" height="50px" />
- )}
- {type && icon && (
- <div tw="h-[50px] border-[1px] border-white mx-4"></div>
- )}
- {type && (
- <>
- <div tw="w-[50px] h-[50px] bg-[#164430] rounded-md flex items-center justify-center">
- <img src={`https://raw.githubusercontent.com/supabase/supabase/master/apps/docs/public/img/icons/menu/${typeIcon}.svg`} width="80%" height="80%" />
- </div>
- <span tw="text-[36px] text-[#ededed] ml-[16px]">{typeName}</span>
- </>
- )}
+ if (type === 'functions' || type === 'function') {
+ typeName = 'Edge Functions'
+ } else if (type === 'self-hosting') {
+ typeIcon = 'resources'
+ } else if (type === 'cli') {
+ typeName = 'CLI'
+ typeIcon = 'reference-cli'
+ }
+
+ return (
+ <div
+ style={{
+ height: '100%',
+ width: '100%',
+ display: 'flex',
+ flexDirection: 'column',
+ color: 'white',
+ backgroundColor: '#1c1c1c',
+ fontFamily: 'Circular',
+ backgroundImage:
+ 'url(https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/og-images/gradient.svg)',
+ backgroundRepeat: 'no-repeat',
+ }}
+ >
+ <div tw="flex flex-row items-center justify-center absolute top-[60px] left-[64px]">
+ {icon && (
+ <img
+ src={`https://raw.githubusercontent.com/supabase/supabase/master/apps/docs/public/img/icons/${icon}-icon.svg`}
+ width="50px"
+ height="50px"
+ />
+ )}
+ {type && icon && <div tw="h-[50px] border-[1px] border-white mx-4"></div>}
+ {type && (
+ <>
+ <div tw="w-[50px] h-[50px] bg-[#164430] rounded-md flex items-center justify-center">
+ <img
+ src={`https://raw.githubusercontent.com/supabase/supabase/master/apps/docs/public/img/icons/menu/${typeIcon}.svg`}
+ width="80%"
+ height="80%"
+ />
+ </div>
+ <span tw="text-[36px] text-[#ededed] ml-[16px]">{typeName}</span>
+ </>
+ )}
+ </div>
+ <div tw="flex flex-col">
+ <div tw="flex flex-col absolute left-[64px] top-[154px] w-[1072px]">
+ <h1 tw="my-0 mb-2 text-[60px]">{!title ? 'Supabase' : title}</h1>
+ <p tw="my-0 mt-2 text-[40px] text-[#f2fff9] opacity-50">{description}</p>
</div>
- <div tw="flex flex-col">
- <div tw="flex flex-col absolute left-[64px] top-[154px] w-[1072px]">
- <h1 tw="my-0 mb-2 text-[60px]">{!title ? 'Supabase' : title}</h1>
- <p tw="my-0 mt-2 text-[40px] text-[#f2fff9] opacity-50">{description}</p>
- </div>
- <div tw="flex flex-row items-center justify-center absolute left-[64px] top-[500px]">
- <img src="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--dark.png" width={180} height={34} />
- <span tw="text-lg font-normal text-[#3ecf8e] ml-2">DOCS</span>
- </div>
+ <div tw="flex flex-row items-center justify-center absolute left-[64px] top-[500px]">
+ <img
+ src="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--dark.png"
+ width={180}
+ height={34}
+ />
+ <span tw="text-lg font-normal text-[#3ecf8e] ml-2">DOCS</span>
</div>
</div>
- )
+ </div>
+ )
}
export default Docs
diff --git a/supabase/functions/og-images/handler.tsx b/supabase/functions/og-images/handler.tsx
index 27e1de9e683..29b0da17cf7 100644
--- a/supabase/functions/og-images/handler.tsx
+++ b/supabase/functions/og-images/handler.tsx
@@ -1,27 +1,35 @@
import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'
import { ImageResponse } from 'https://deno.land/x/[email protected]/mod.ts'
+import CustomerStories from './component/CustomerStories.tsx'
import Docs from './component/Docs.tsx'
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
}
// Load custom font
-const FONT_URL = 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw6/CircularStd-Book.otf'
+const FONT_URL =
+ 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw6/CircularStd-Book.otf'
const font = fetch(new URL(FONT_URL, import.meta.url)).then((res) => res.arrayBuffer())
const fontData = await font
export async function handler(req: Request) {
const url = new URL(req.url)
- const site = url.searchParams.get('site')?.toLowerCase() ?? url.searchParams.get('amp;site')?.toLowerCase()
- const icon = url.searchParams.get('icon')?.toLowerCase() ?? url.searchParams.get('amp;icon')?.toLowerCase()
+
+ const site =
+ url.searchParams.get('site')?.toLowerCase() ?? url.searchParams.get('amp;site')?.toLowerCase()
+ const icon =
+ url.searchParams.get('icon')?.toLowerCase() ?? url.searchParams.get('amp;icon')?.toLowerCase()
+ const customer =
+ url.searchParams.get('customer')?.toLowerCase() ??
+ url.searchParams.get('amp;customer')?.toLowerCase()
const type = url.searchParams.get('type') ?? url.searchParams.get('amp;type')
const title = url.searchParams.get('title') ?? url.searchParams.get('amp;title')
const description = url.searchParams.get('description') ?? url.searchParams.get('amp;description')
- if(!site || !title || !description) {
+ if (!site || !title) {
return new Response(JSON.stringify({ message: 'missing params' }), {
headers: { ...corsHeaders },
status: 404,
@@ -30,7 +38,15 @@ export async function handler(req: Request) {
switch (site) {
case 'docs':
- return new ImageResponse(( <Docs title={title} description={description !== 'undefined' ? description : ''} type={type} icon={icon} /> ),
+ return new ImageResponse(
+ (
+ <Docs
+ title={title}
+ description={description !== 'undefined' ? description : ''}
+ type={type}
+ icon={icon}
+ />
+ ),
{
width: 1200,
height: 630,
@@ -46,14 +62,32 @@ export async function handler(req: Request) {
'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',
'cdn-cache-control': 'max-age=31536000',
},
- })
- break;
-
+ }
+ )
+ break
+ case 'customers':
+ return new ImageResponse(<CustomerStories title={title} customer={customer} />, {
+ width: 1200,
+ height: 630,
+ fonts: [
+ {
+ name: 'Circular',
+ data: fontData,
+ style: 'normal',
+ },
+ ],
+ headers: {
+ 'content-type': 'image/png',
+ 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',
+ 'cdn-cache-control': 'max-age=31536000',
+ },
+ })
+ break
default:
- return new Response(JSON.stringify({message: 'site not found'}), {
+ return new Response(JSON.stringify({ message: 'site not found' }), {
headers: { ...corsHeaders },
status: 404,
})
- break;
+ break
}
}
diff --git a/supabase/functions/og-images/index.ts b/supabase/functions/og-images/index.ts
index ebf53f34dce..dc4f145b57d 100644
--- a/supabase/functions/og-images/index.ts
+++ b/supabase/functions/og-images/index.ts
@@ -2,3 +2,5 @@ import { serve } from 'https://deno.land/[email protected]/http/server.ts'
import { handler } from './handler.tsx'
serve(handler)
+
+console.log('Serving og-images function')