Skip to content

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

chore: Handle AuthProviders component for md output (#47127)

Jeremias Menichelli076cf9de67b8
diff --git a/apps/docs/internals/generate-guides-markdown.ts b/apps/docs/internals/generate-guides-markdown.ts
index 72aeb82ded4..e692ae1102b 100644
--- a/apps/docs/internals/generate-guides-markdown.ts
+++ b/apps/docs/internals/generate-guides-markdown.ts
@@ -11,6 +11,7 @@ import { toMarkdown } from 'mdast-util-to-markdown'
import { gfm } from 'micromark-extension-gfm'
import { mdxjs } from 'micromark-extension-mdxjs'
import { Admonition } from './markdown-schema/Admonition'
+import { AuthProviders } from './markdown-schema/AuthProviders'
import { ComputeDiskLimitsTable } from './markdown-schema/ComputeDiskLimitsTable'
import { addBaseUrlPrefix } from './internal-links'
import { Link } from './markdown-schema/Link'
@@ -132,6 +133,7 @@ function applySchema(parent: Parent, schema: ComponentSchema): void {
*/
const SCHEMA: ComponentSchema = {
Admonition,
+ AuthProviders,
ComputeDiskLimitsTable,
Link,
Price,
diff --git a/apps/docs/internals/markdown-schema/AuthProviders.ts b/apps/docs/internals/markdown-schema/AuthProviders.ts
new file mode 100644
index 00000000000..09359583edb
--- /dev/null
+++ b/apps/docs/internals/markdown-schema/AuthProviders.ts
@@ -0,0 +1,10 @@
+import authProviders from '../../data/authProviders'
+import { withDocsBasePath } from '../internal-links'
+
+export const AuthProviders = ({ props }: { props: Record<string, unknown> }): string => {
+ const type = String(props.type ?? '')
+ return authProviders
+ .filter((p) => p.authType === type)
+ .map((p) => `- [${p.name}](${withDocsBasePath(p.href)})`)
+ .join('\n')
+}