From 02471fe41ee0380617c3e81fca35137a609f237d Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Wed, 14 Dec 2022 17:52:51 +0800 Subject: [PATCH] fix link issue. move homepage content --- apps/docs/pages/index.mdx | 385 ++++++++++++++++++++++++++-------- apps/docs/pages/new/index.mdx | 323 ---------------------------- 2 files changed, 303 insertions(+), 405 deletions(-) delete mode 100644 apps/docs/pages/new/index.mdx diff --git a/apps/docs/pages/index.mdx b/apps/docs/pages/index.mdx index 19433105df3..a47df32ed83 100644 --- a/apps/docs/pages/index.mdx +++ b/apps/docs/pages/index.mdx @@ -1,101 +1,322 @@ -import Layout from '~/layouts/DefaultGuideLayout' -import NewContent from '~/pages/new/index.mdx' +import Layout from '~/layouts/DefaultLayout' +import Link from 'next/link' +import { GlassPanel, IconPanel, Button, IconChevronRight } from 'ui' export const meta = { - id: 'introduction', - title: 'Introduction', - description: 'Introduction to Supabase', - hide_table_of_contents: false, + title: 'Supabase Docs', + description: + 'Supabase is an open source Firebase alternative providing all the backend features you need to build a product.', + subtitle: 'Supabase Developer Documentation and API Reference', } -export function CheckDoc() { - if (process.env.NEXT_PUBLIC_NEW_DOCS === 'true') return NewContent -} +

+ Supabase is an open source Firebase alternative providing all the backend features you need to + build a product. [Learn more](/docs/architecture) about Supabase, start with the + [tutorials](/docs/guides/getting-started#tutorials), or dive straight into the different products + and APIs. +

-Supabase is an open source Firebase alternative providing all the backend features you need to build a product. -You can use it completely, or just the features you need. +{/* start container */} -[Start a project](https://app.supabase.com) with the hosted platform or learn how to [host Supabase](/docs/guides/hosting/overview) yourself. +
-## Learn about features +
+
+
+ +
+

Getting Started

+ + Discover how to set up a database to an app making queries in just a few minutes. + +
What you will learn
+ +
+
+
+ +
+ Setting up a Supabase project and app +
+
+
+ +
+ Adding some sample data to your project +
+
+
+ +
+ Select() from your new database table +
+
+ +
+
+ +
+
+ + + + + + + + + + +
+
+
+
-
-
-
-
- + + -
-
- -
-
- -
-
- -
-
- -
-
- +
+

Ready to make a fully working app?

+

Follow the step-by-step tutorials.

+
+
-## Start with a framework +
+
-Supabase is just Postgres, which makes it compatible with a large number of tools and frameworks. + ### Product Documentation - +
-export const Page = ({ children }) => { - if (process.env.NEXT_PUBLIC_NEW_DOCS === 'true') { - return NewContent() - } - return -} +
+ {products.map((product) => { + return ( + + + + {product.description} + + + + ) + +})} + + {platform.map((product) => { + return ( + + + + {product.description} + + + + ) + +})} + +
+ +
+ +
+ +
+ + ### Reference Documentation + +
+ +
+ {apis.map((product) => { + return ( + + + + {product.description} + + + + ) + +})} + +
+
+ +{/* end of container */} + +
+ +export const products = [ + { + title: 'Database', + icon: '/docs/img/icons/menu/database', + hasLightIcon: true, + href: '/guides/database', + description: + 'Supabase provides a full Postgres database for every project with Realtime functionality, database backups, extensions, and more.', + span: 'col-span-12 md:col-span-6', + }, + { + title: 'Auth', + icon: '/docs/img/icons/menu/auth', + hasLightIcon: true, + href: '/guides/auth/overview', + description: + 'Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.', + span: 'col-span-12 md:col-span-6', + }, + { + title: 'Storage', + icon: '/docs/img/icons/menu/storage', + hasLightIcon: true, + href: '/guides/storage', + description: + 'Store, organize, transform, and serve large files—fully integrated with your Postgres database with Row Level Security access policies.', + }, + { + title: 'Realtime', + icon: '/docs/img/icons/menu/realtime', + hasLightIcon: true, + href: '/guides/realtime', + description: + 'Listen to database changes, store and sync user states across clients, broadcast data to clients subscribed to a channel, and more.', + }, + { + title: 'Edge Functions', + icon: '/docs/img/icons/menu/functions', + hasLightIcon: true, + href: '/guides/functions', + description: + 'Globally distributed, server-side functions to execute your code closest to your users for the lowest latency.', + }, +] + +export const apis = [ + { + title: 'JavaScript Client Library', + icon: '/docs/img/icons/menu/reference-javascript', + hasLightIcon: true, + href: 'reference/javascript/introduction', + description: 'Official client libraries for JavaScript and TypeScript.', + }, + { + title: 'Flutter Client Library', + icon: '/docs/img/icons/menu/reference-dart', + hasLightIcon: true, + href: 'reference/dart/introduction', + description: 'Official client libraries for Flutter and Dart.', + }, + { + title: 'Management API', + icon: '/docs/img/icons/menu/reference-api', + hasLightIcon: true, + href: 'reference/api/introduction', + description: 'Manage your Supabase projects and organizations programmatically.', + }, + { + title: 'Supabase CLI', + icon: '/docs/img/icons/menu/reference-api', + hasLightIcon: true, + href: 'reference/cli/introduction', + description: + 'Use the CLI to develop your project locally, manage database migrations, and deploy to the Supabase Platform or self-host.', + }, + { + title: 'Self-Hosting Auth', + icon: '/docs/img/icons/menu/reference-auth', + hasLightIcon: true, + href: 'reference/self-hosting-auth/introduction', + description: 'Self-host your own Auth server.', + }, + { + title: 'Self-Hosting Storage', + icon: '/docs/img/icons/menu/reference-storage', + hasLightIcon: true, + href: 'reference/self-hosting-storage/introduction', + description: 'Self-host your own Storage server.', + }, + { + title: 'Self-Hosting Realtime', + icon: '/docs/img/icons/menu/reference-realtime', + hasLightIcon: true, + href: 'reference/self-hosting-realtime/introduction', + description: 'Self-host your own Realtime server.', + }, +] + +export const platform = [ + { + // header: '/docs/img/cards/sample-card-header-3.svg', + title: 'Platform Guides', + icon: '/docs/img/icons/menu/platform', + hasLightIcon: true, + href: 'guides/platform', + description: + 'Learn more about the tools and services powering the Supabase Platform, available add-ons, and how to customize the platform for your needs.', + }, + { + // header: '/docs/img/cards/sample-card-header-2.svg', + title: 'Resources', + icon: '/docs/img/icons/menu/resources', + hasLightIcon: true, + href: 'guides/resources', + description: 'View examples, curated content from the community, migration guides, and more.', + }, + { + // header: '/docs/img/cards/sample-card-header-2.svg', + title: 'Integrations', + icon: '/docs/img/icons/menu/integrations', + hasLightIcon: true, + href: 'guides/integrations', + description: 'Explore a variety of integrations from Supabase partners.', + }, +] + +export const Page = ({ children }) => export default Page diff --git a/apps/docs/pages/new/index.mdx b/apps/docs/pages/new/index.mdx deleted file mode 100644 index b9762af04b1..00000000000 --- a/apps/docs/pages/new/index.mdx +++ /dev/null @@ -1,323 +0,0 @@ -import Layout from '~/layouts/DefaultLayout' -import Link from 'next/link' -import { GlassPanel, IconPanel, Button, IconChevronRight } from 'ui' - -export const meta = { - title: 'Supabase Docs', - description: - 'Supabase is an open source Firebase alternative providing all the backend features you need to build a product.', - subtitle: 'Supabase Developer Documentation and API Reference', -} - -

- Supabase is an open source Firebase alternative providing all the backend features you need to - build a product. - - [Learn more](/docs/architecture) about Supabase, start with the - [tutorials](/docs/guides/getting-started#tutorials), or dive straight into the different products and APIs. -

- -{/* start container */} - -
- -
-
-
- -
-

Getting Started

- - Discover how to set up a database to an app making queries in just a few minutes. - -
What you will learn
- -
-
-
- -
- Setting up a Supabase project and app -
-
-
- -
- Adding some sample data to your project -
-
-
- -
- Select() from your new database table -
-
- -
-
- -
-
- - - - - - - - - - -
-
-
-
- -
-
- - - -
-

Ready to make a fully working app?

-

Follow the step-by-step tutorials.

-
- -
-
- -
-
- - ### Product Documentation - -
- -
- {products.map((product) => { - return ( - - - - {product.description} - - - - ) - -})} - - {platform.map((product) => { - return ( - - - - {product.description} - - - - ) - -})} - -
- -
- -
- -
- - ### Reference Documentation - -
- -
- {apis.map((product) => { - return ( - - - - {product.description} - - - - ) - -})} - -
-
- -{/* end of container */} - -
- -export const products = [ - { - title: 'Database', - icon: '/docs/img/icons/menu/database', - hasLightIcon: true, - href: '/guides/database', - description: - 'Supabase provides a full Postgres database for every project with Realtime functionality, database backups, extensions, and more.', - span: 'col-span-12 md:col-span-6', - }, - { - title: 'Auth', - icon: '/docs/img/icons/menu/auth', - hasLightIcon: true, - href: '/guides/auth', - description: - 'Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.', - span: 'col-span-12 md:col-span-6', - }, - { - title: 'Storage', - icon: '/docs/img/icons/menu/storage', - hasLightIcon: true, - href: '/guides/storage', - description: - 'Store, organize, transform, and serve large files—fully integrated with your Postgres database with Row Level Security access policies.', - }, - { - title: 'Realtime', - icon: '/docs/img/icons/menu/realtime', - hasLightIcon: true, - href: '/guides/realtime', - description: - 'Listen to database changes, store and sync user states across clients, broadcast data to clients subscribed to a channel, and more.', - }, - { - title: 'Edge Functions', - icon: '/docs/img/icons/menu/functions', - hasLightIcon: true, - href: '/guides/functions', - description: - 'Globally distributed, server-side functions to execute your code closest to your users for the lowest latency.', - }, -] - -export const apis = [ - { - title: 'JavaScript Client Library', - icon: '/docs/img/icons/menu/reference-javascript', - hasLightIcon: true, - href: 'reference/javascript/introduction', - description: 'Official client libraries for JavaScript and TypeScript.', - }, - { - title: 'Flutter Client Library', - icon: '/docs/img/icons/menu/reference-dart', - hasLightIcon: true, - href: 'reference/dart/introduction', - description: 'Official client libraries for Flutter and Dart.', - }, - { - title: 'Management API', - icon: '/docs/img/icons/menu/reference-api', - hasLightIcon: true, - href: 'reference/api/introduction', - description: 'Manage your Supabase projects and organizations programmatically.', - }, - { - title: 'Supabase CLI', - icon: '/docs/img/icons/menu/reference-api', - hasLightIcon: true, - href: 'reference/cli/introduction', - description: - 'Use the CLI to develop your project locally, manage database migrations, and deploy to the Supabase Platform or self-host.', - }, - { - title: 'Self-Hosting Auth', - icon: '/docs/img/icons/menu/reference-auth', - hasLightIcon: true, - href: 'reference/self-hosting-auth/introduction', - description: 'Self-host your own Auth server.', - }, - { - title: 'Self-Hosting Storage', - icon: '/docs/img/icons/menu/reference-storage', - hasLightIcon: true, - href: 'reference/self-hosting-storage/introduction', - description: 'Self-host your own Storage server.', - }, - { - title: 'Self-Hosting Realtime', - icon: '/docs/img/icons/menu/reference-realtime', - hasLightIcon: true, - href: 'reference/self-hosting-realtime/introduction', - description: 'Self-host your own Realtime server.', - }, -] - -export const platform = [ - { - // header: '/docs/img/cards/sample-card-header-3.svg', - title: 'Platform Guides', - icon: '/docs/img/icons/menu/platform', - hasLightIcon: true, - href: 'guides/platform', - description: - 'Learn more about the tools and services powering the Supabase Platform, available add-ons, and how to customize the platform for your needs.', - }, - { - // header: '/docs/img/cards/sample-card-header-2.svg', - title: 'Resources', - icon: '/docs/img/icons/menu/resources', - hasLightIcon: true, - href: 'guides/resources', - description: 'View examples, curated content from the community, migration guides, and more.', - }, - { - // header: '/docs/img/cards/sample-card-header-2.svg', - title: 'Integrations', - icon: '/docs/img/icons/menu/integrations', - hasLightIcon: true, - href: 'guides/integrations', - description: 'Explore a variety of integrations from Supabase partners.', - }, -] - -export const Page = ({ children }) => - -export default Page