The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(docs): crawlers page generation for pages with mdx components (#35629)
Charis6ba23ac7c9f3
diff --git a/apps/docs/app/api/crawlers/route.ts b/apps/docs/app/api/crawlers/route.tsindex 39f4eed592a..0aae261baea 100644--- a/apps/docs/app/api/crawlers/route.ts+++ b/apps/docs/app/api/crawlers/route.ts@@ -157,9 +157,7 @@ async function functionDetails(return fullDescription + parameters + examples}-function mdxToHtml(markdownUnescaped: string): string {- const markdown = markdownUnescaped.replace(/(?<!\\)\{/g, '\\{').replace(/(?<!\\)\}/g, '\\}')-+function mdxToHtml(markdown: string): string {const mdast = fromMarkdown(markdown, {extensions: [mdxjs()],mdastExtensions: [mdxFromMarkdown()],diff --git a/apps/docs/features/docs/GuidesMdx.utils.tsx b/apps/docs/features/docs/GuidesMdx.utils.tsxindex b6532d9c8e6..b932bbb8928 100644--- a/apps/docs/features/docs/GuidesMdx.utils.tsx+++ b/apps/docs/features/docs/GuidesMdx.utils.tsx@@ -55,7 +55,9 @@ const getGuidesMarkdownInternal = async (slug: string[]) => {try {mdx = await readFile(fullPath, 'utf-8')} catch {- console.error('Error reading Markdown at path: %s', fullPath)+ // Not using console.error because this includes pages that are genuine+ // 404s and clutters up the logs+ console.log('Error reading Markdown at path: %s', fullPath)notFound()}@@ -165,4 +167,4 @@ function removeRedundantH1(content: string) {return content}-export { getGuidesMarkdown, genGuidesStaticParams, genGuideMeta, removeRedundantH1 }+export { genGuideMeta, genGuidesStaticParams, getGuidesMarkdown, removeRedundantH1 }