Skip to content

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

feat(www): add service json-ld to homepage (#49849)

Pamela Chia121332c1aca8
diff --git a/apps/www/app/(home)/page.tsx b/apps/www/app/(home)/page.tsx
index d9c2094bff7..ae5210b1b52 100644
--- a/apps/www/app/(home)/page.tsx
+++ b/apps/www/app/(home)/page.tsx
@@ -6,6 +6,7 @@ import { DEFAULT_META_DESCRIPTION } from '@/lib/constants'
import {
organizationSchema,
serializeJsonLd,
+ serviceSchema,
softwareApplicationSchema,
websiteSchema,
} from '@/lib/json-ld'
@@ -42,6 +43,27 @@ export default function HomePage() {
),
}}
/>
+ <script
+ type="application/ld+json"
+ dangerouslySetInnerHTML={{
+ __html: serializeJsonLd(
+ serviceSchema({
+ name: 'Supabase',
+ description: DEFAULT_META_DESCRIPTION,
+ url: 'https://supabase.com',
+ serviceType: 'Postgres development platform',
+ offerings: [
+ { name: 'Database', url: 'https://supabase.com/database' },
+ { name: 'Authentication', url: 'https://supabase.com/auth' },
+ { name: 'Storage', url: 'https://supabase.com/storage' },
+ { name: 'Edge Functions', url: 'https://supabase.com/edge-functions' },
+ { name: 'Realtime', url: 'https://supabase.com/realtime' },
+ { name: 'Vector', url: 'https://supabase.com/modules/vector' },
+ ],
+ })
+ ),
+ }}
+ />
<HomeContent frameworksSlot={<FrameworksSection />} />
</>
)
diff --git a/apps/www/lib/json-ld.ts b/apps/www/lib/json-ld.ts
index 198980847e1..6e0e46a6b9d 100644
--- a/apps/www/lib/json-ld.ts
+++ b/apps/www/lib/json-ld.ts
@@ -96,6 +96,38 @@ export function softwareApplicationSchema(input: SoftwareApplicationSchemaInput)
}
}
+interface ServiceSchemaInput {
+ name: string
+ description: string
+ url: string
+ serviceType: string
+ offerings: Array<{ name: string; url: string }>
+}
+
+export function serviceSchema(input: ServiceSchemaInput) {
+ return {
+ '@context': 'https://schema.org',
+ '@type': 'Service',
+ name: input.name,
+ description: input.description,
+ url: input.url,
+ serviceType: input.serviceType,
+ provider: { '@id': ORG_ID },
+ hasOfferCatalog: {
+ '@type': 'OfferCatalog',
+ name: `${input.name} products`,
+ itemListElement: input.offerings.map((offering) => ({
+ '@type': 'Offer',
+ itemOffered: {
+ '@type': 'Service',
+ name: offering.name,
+ url: offering.url,
+ },
+ })),
+ },
+ }
+}
+
export interface BreadcrumbItem {
name: string
url: string
diff --git a/apps/www/public/.well-known/api-catalog b/apps/www/public/.well-known/api-catalog
index a83a0257975..7fda0319c61 100644
--- a/apps/www/public/.well-known/api-catalog
+++ b/apps/www/public/.well-known/api-catalog
@@ -1,5 +1,13 @@
{
"linkset": [
+ {
+ "anchor": "https://supabase.com/.well-known/api-catalog",
+ "item": [
+ {
+ "href": "https://api.supabase.com/v1"
+ }
+ ]
+ },
{
"anchor": "https://api.supabase.com/v1",
"service-desc": [