The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(docs): integrations sidebar linking to missing partners (#29924)
Charisdcc3d4f2673c
diff --git a/apps/docs/app/guides/(with-sidebar)/[...slug]/page.tsx b/apps/docs/app/guides/(with-sidebar)/[...slug]/page.tsxindex 2bbfc101eea..3ec89693cbe 100644--- a/apps/docs/app/guides/(with-sidebar)/[...slug]/page.tsx+++ b/apps/docs/app/guides/(with-sidebar)/[...slug]/page.tsx@@ -5,6 +5,9 @@ import {} from '~/features/docs/GuidesMdx.utils'import { GuideTemplate } from '~/features/docs/GuidesMdx.template'+// Serve 404 when accessing pages that aren't prebuilt+export const dynamicParams = false+type Params = { slug: string[] }const GuidePage = async ({ params }: { params: Params }) => {diff --git a/apps/docs/app/guides/(with-sidebar)/layout.tsx b/apps/docs/app/guides/(with-sidebar)/layout.tsxindex 452ee294b26..7c57707cdee 100644--- a/apps/docs/app/guides/(with-sidebar)/layout.tsx+++ b/apps/docs/app/guides/(with-sidebar)/layout.tsx@@ -1,10 +1,14 @@-import { type PropsWithChildren } from 'react'+import { cache, type PropsWithChildren } from 'react'import { IS_PLATFORM } from 'common'import { supabaseMisc } from '~/lib/supabaseMisc'import Layout from '~/layouts/guides'+// Revalidate occasionally to pick up changes to partners+// 60 seconds/minute * 60 minutes/hour * 24 hours/day+export const revalidate = 86_400+const GuidesLayout = async ({ children }: PropsWithChildren) => {const partners = IS_PLATFORM ? await getPartners() : []const partnerNavItems = partners.map((partner) => ({@@ -15,10 +19,12 @@ const GuidesLayout = async ({ children }: PropsWithChildren) => {return <Layout additionalNavItems={partnerNavItems}>{children}</Layout>}-async function getPartners() {+const getPartners = cache(getPartnersImpl)+async function getPartnersImpl() {const { data, error } = await supabaseMisc().from('partners').select('slug, title')+ .eq('approved', true).eq('type', 'technology').order('title')if (error) {diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjsindex 9a9d8196565..37333dad42d 100644--- a/apps/docs/next.config.mjs+++ b/apps/docs/next.config.mjs@@ -58,6 +58,7 @@ const nextConfig = {experimental: {outputFileTracingIncludes: {'/api/crawlers': ['./features/docs/generated/**/*', './docs/ref/**/*'],+ '/guides/**/*': ['./content/guides/**/*', './content/troubleshooting/**/*'],'/reference/**/*': ['./features/docs/generated/**/*', './docs/ref/**/*'],},},