The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
build: Enable static generation on preview (#45592)
Jeremias Menichelli5065e3ae9f0a
diff --git a/apps/docs/app/guides/ai/[[...slug]]/page.tsx b/apps/docs/app/guides/ai/[[...slug]]/page.tsxindex f517756dd71..c17bd51fb12 100644--- a/apps/docs/app/guides/ai/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/ai/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const AiGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('ai') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('ai') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['ai', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/api/[[...slug]]/page.tsx b/apps/docs/app/guides/api/[[...slug]]/page.tsxindex f68aadb62e4..1ec826244b8 100644--- a/apps/docs/app/guides/api/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/api/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const ApiGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('api') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('api') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['api', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/auth/[[...slug]]/page.tsx b/apps/docs/app/guides/auth/[[...slug]]/page.tsxindex 49c670824a4..f4c062505be 100644--- a/apps/docs/app/guides/auth/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/auth/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const AuthGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('auth') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('auth') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['auth', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/cron/[[...slug]]/page.tsx b/apps/docs/app/guides/cron/[[...slug]]/page.tsxindex e77e622d824..3c40eef45c9 100644--- a/apps/docs/app/guides/cron/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/cron/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const CronGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('cron') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('cron') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['cron', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/database/[[...slug]]/page.tsx b/apps/docs/app/guides/database/[[...slug]]/page.tsxindex 8b6622d22fc..124f0b315a9 100644--- a/apps/docs/app/guides/database/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/database/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const DatabaseGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('database') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('database') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['database', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/database/extensions/wrappers/[[...slug]]/page.tsx b/apps/docs/app/guides/database/extensions/wrappers/[[...slug]]/page.tsxindex ddce4af8b82..aa0e0fd0c15 100644--- a/apps/docs/app/guides/database/extensions/wrappers/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/database/extensions/wrappers/[[...slug]]/page.tsx@@ -1,15 +1,5 @@-import matter from 'gray-matter'-import Link from 'next/link'-import { notFound } from 'next/navigation'import { readFile } from 'node:fs/promises'import { join, relative } from 'node:path'-import rehypeSlug from 'rehype-slug'-import emoji from 'remark-emoji'-// End of third-party imports--import { IS_PROD, isFeatureEnabled } from 'common'-import { Button } from 'ui'-import { Admonition } from 'ui-patterns'import {genGuideMeta,genGuidesStaticParams,@@ -17,6 +7,9 @@ import {} from '~/features/docs/GuidesMdx.utils'import { newEditLink } from '~/features/helpers.edit-link'import { Guide, GuideArticle, GuideFooter, GuideHeader, GuideMdxContent } from '~/features/ui/guide'+// End of third-party imports++import { IS_DEV } from '~/lib/constants'import { GUIDES_DIRECTORY, isValidGuideFrontmatter } from '~/lib/docs'import { linkTransform, type UrlTransformFunction } from '~/lib/mdx/plugins/rehypeLinkTransform'import remarkMkDocsAdmonition from '~/lib/mdx/plugins/remarkAdmonition'@@ -24,6 +17,14 @@ import { removeTitle } from '~/lib/mdx/plugins/remarkRemoveTitle'import remarkPyMdownTabs from '~/lib/mdx/plugins/remarkTabs'import { getGitHubFileContents, octokit } from '~/lib/octokit'import type { SerializeOptions } from '~/types/next-mdx-remote-serialize'+import { isFeatureEnabled } from 'common'+import matter from 'gray-matter'+import Link from 'next/link'+import { notFound } from 'next/navigation'+import rehypeSlug from 'rehype-slug'+import emoji from 'remark-emoji'+import { Button } from 'ui'+import { Admonition } from 'ui-patterns'// We fetch these docs at build time from an external repoconst org = 'supabase'@@ -424,7 +425,7 @@ const urlTransform: UrlTransformFunction = (url) => {}const generateStaticParams = async () => {- if (IS_PROD) {+ if (!IS_DEV) {return []}diff --git a/apps/docs/app/guides/deployment/[[...slug]]/page.tsx b/apps/docs/app/guides/deployment/[[...slug]]/page.tsxindex 7b8be32adcc..0b15eb80b1f 100644--- a/apps/docs/app/guides/deployment/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/deployment/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const DeploymentGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('deployment') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('deployment') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['deployment', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/deployment/terraform/[[...slug]]/page.tsx b/apps/docs/app/guides/deployment/terraform/[[...slug]]/page.tsxindex c97957170c2..07c76c8da40 100644--- a/apps/docs/app/guides/deployment/terraform/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/deployment/terraform/[[...slug]]/page.tsx@@ -1,24 +1,24 @@-import matter from 'gray-matter'-import { notFound } from 'next/navigation'-import rehypeSlug from 'rehype-slug'-import { GuideTemplate, newEditLink } from '~/features/docs/GuidesMdx.template'import { genGuideMeta, removeRedundantH1 } from '~/features/docs/GuidesMdx.utils'-import { getGitHubFileContents } from '~/lib/octokit'+import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'import { isValidGuideFrontmatter } from '~/lib/docs'-import { UrlTransformFunction, linkTransform } from '~/lib/mdx/plugins/rehypeLinkTransform'+import { linkTransform, UrlTransformFunction } from '~/lib/mdx/plugins/rehypeLinkTransform'import remarkMkDocsAdmonition from '~/lib/mdx/plugins/remarkAdmonition'import { removeTitle } from '~/lib/mdx/plugins/remarkRemoveTitle'import remarkPyMdownTabs from '~/lib/mdx/plugins/remarkTabs'+import { getGitHubFileContents } from '~/lib/octokit'+import { SerializeOptions } from '~/types/next-mdx-remote-serialize'+import matter from 'gray-matter'+import { notFound } from 'next/navigation'+import rehypeSlug from 'rehype-slug'+import {terraformDocsBranch,terraformDocsDocsDir,terraformDocsOrg,terraformDocsRepo,} from '../terraformConstants'-import { SerializeOptions } from '~/types/next-mdx-remote-serialize'-import { IS_PROD } from 'common'-import { getEmptyArray } from '~/features/helpers.fn'// Each external docs page is mapped to a local pageconst pageMap = [@@ -143,7 +143,7 @@ const getContent = async ({ slug }: Params) => {}}-const generateStaticParams = IS_PROD+const generateStaticParams = !IS_DEV? async () => pageMap.map(({ slug }) => ({ slug: slug ? [slug] : [] })): getEmptyArrayconst generateMetadata = genGuideMeta(getContent)diff --git a/apps/docs/app/guides/functions/[[...slug]]/page.tsx b/apps/docs/app/guides/functions/[[...slug]]/page.tsxindex e416a7b17ae..416735e703c 100644--- a/apps/docs/app/guides/functions/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/functions/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const FunctionsGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('functions') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('functions') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['functions', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/getting-started/[[...slug]]/page.tsx b/apps/docs/app/guides/getting-started/[[...slug]]/page.tsxindex 52e9425c92f..a3c33a9a546 100644--- a/apps/docs/app/guides/getting-started/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/getting-started/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const GettingStartedGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('getting-started') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('getting-started') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['getting-started', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/graphql/[[...slug]]/page.tsx b/apps/docs/app/guides/graphql/[[...slug]]/page.tsxindex 5368816194c..eb0c01b48f5 100644--- a/apps/docs/app/guides/graphql/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/graphql/[[...slug]]/page.tsx@@ -1,17 +1,16 @@-import { notFound } from 'next/navigation'import { isAbsolute, relative } from 'path'-import rehypeSlug from 'rehype-slug'-import { GuideTemplate, newEditLink } from '~/features/docs/GuidesMdx.template'import { genGuideMeta } from '~/features/docs/GuidesMdx.utils'-import { getGitHubFileContents } from '~/lib/octokit'-import { UrlTransformFunction, linkTransform } from '~/lib/mdx/plugins/rehypeLinkTransform'+import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'+import { linkTransform, UrlTransformFunction } from '~/lib/mdx/plugins/rehypeLinkTransform'import remarkMkDocsAdmonition from '~/lib/mdx/plugins/remarkAdmonition'import { removeTitle } from '~/lib/mdx/plugins/remarkRemoveTitle'import remarkPyMdownTabs from '~/lib/mdx/plugins/remarkTabs'+import { getGitHubFileContents } from '~/lib/octokit'import { SerializeOptions } from '~/types/next-mdx-remote-serialize'-import { IS_PROD } from 'common'-import { getEmptyArray } from '~/features/helpers.fn'+import { notFound } from 'next/navigation'+import rehypeSlug from 'rehype-slug'// We fetch these docs at build time from an external repoconst org = 'supabase'@@ -190,7 +189,7 @@ const urlTransform: UrlTransformFunction = (url) => {}}-const generateStaticParams = IS_PROD+const generateStaticParams = !IS_DEV? async () => pageMap.map(({ slug }) => ({ slug: slug ? [slug] : [] })): getEmptyArrayconst generateMetadata = genGuideMeta(getContent)diff --git a/apps/docs/app/guides/integrations/[[...slug]]/page.tsx b/apps/docs/app/guides/integrations/[[...slug]]/page.tsxindex 819c1e0bfd7..cc02780dc73 100644--- a/apps/docs/app/guides/integrations/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/integrations/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const IntegrationsGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('integrations') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('integrations') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['integrations', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/local-development/[[...slug]]/page.tsx b/apps/docs/app/guides/local-development/[[...slug]]/page.tsxindex 4166055f268..81dcba599a6 100644--- a/apps/docs/app/guides/local-development/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/local-development/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const LocalDevelopmentGuidePage = async (props: { params: Promise<Params> }) =>return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('local-development') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('local-development') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['local-development', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/platform/[[...slug]]/page.tsx b/apps/docs/app/guides/platform/[[...slug]]/page.tsxindex 7ca75717816..dce62f3cf79 100644--- a/apps/docs/app/guides/platform/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/platform/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const PlatformGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('platform') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('platform') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['platform', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/queues/[[...slug]]/page.tsx b/apps/docs/app/guides/queues/[[...slug]]/page.tsxindex 991c81c189b..fa3852979b4 100644--- a/apps/docs/app/guides/queues/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/queues/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const QueuesGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('queues') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('queues') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['queues', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/realtime/[[...slug]]/page.tsx b/apps/docs/app/guides/realtime/[[...slug]]/page.tsxindex c65eb2ae994..8b9f7bbbce4 100644--- a/apps/docs/app/guides/realtime/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/realtime/[[...slug]]/page.tsx@@ -1,4 +1,3 @@-import { IS_PROD } from 'common'import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {genGuideMeta,@@ -6,6 +5,7 @@ import {getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const RealtimeGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('realtime') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('realtime') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['realtime', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/resources/[[...slug]]/page.tsx b/apps/docs/app/guides/resources/[[...slug]]/page.tsxindex c4ef4796b42..d32333d1b97 100644--- a/apps/docs/app/guides/resources/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/resources/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const ResourcesGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('resources') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('resources') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['resources', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/security/[[...slug]]/page.tsx b/apps/docs/app/guides/security/[[...slug]]/page.tsxindex 4a62d58281d..ce65389dc74 100644--- a/apps/docs/app/guides/security/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/security/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const SecurityGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('security') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('security') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['security', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/self-hosting/[[...slug]]/page.tsx b/apps/docs/app/guides/self-hosting/[[...slug]]/page.tsxindex 39f7d03b452..9d17d547ad6 100644--- a/apps/docs/app/guides/self-hosting/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/self-hosting/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const SelfHostingGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('self-hosting') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('self-hosting') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['self-hosting', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/storage/[[...slug]]/page.tsx b/apps/docs/app/guides/storage/[[...slug]]/page.tsxindex 67ad5d42301..6f01587f27f 100644--- a/apps/docs/app/guides/storage/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/storage/[[...slug]]/page.tsx@@ -1,4 +1,3 @@-import { IS_PROD } from 'common'import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {genGuideMeta,@@ -6,6 +5,7 @@ import {getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const StorageGuidePage = async (props: { params: Promise<Params> }) => {return <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('storage') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('storage') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['storage', ...(params.slug ?? [])]))diff --git a/apps/docs/app/guides/telemetry/[[...slug]]/page.tsx b/apps/docs/app/guides/telemetry/[[...slug]]/page.tsxindex 26be534bde8..0aa9feceb0d 100644--- a/apps/docs/app/guides/telemetry/[[...slug]]/page.tsx+++ b/apps/docs/app/guides/telemetry/[[...slug]]/page.tsx@@ -1,11 +1,11 @@+import { GuideTemplate } from '~/features/docs/GuidesMdx.template'import {- getGuidesMarkdown,genGuideMeta,genGuidesStaticParams,+ getGuidesMarkdown,} from '~/features/docs/GuidesMdx.utils'-import { GuideTemplate } from '~/features/docs/GuidesMdx.template'-import { IS_PROD } from 'common'import { getEmptyArray } from '~/features/helpers.fn'+import { IS_DEV } from '~/lib/constants'type Params = { slug?: string[] }@@ -17,7 +17,7 @@ const MonitoringTroubleshootingGuidePage = async (props: { params: Promise<Paramreturn <GuideTemplate {...data!} />}-const generateStaticParams = IS_PROD ? genGuidesStaticParams('telemetry') : getEmptyArray+const generateStaticParams = !IS_DEV ? genGuidesStaticParams('telemetry') : getEmptyArrayconst generateMetadata = genGuideMeta((params: { slug?: string[] }) =>getGuidesMarkdown(['telemetry', ...(params.slug ?? [])]))