diff --git a/apps/reference/_cli/config.mdx b/apps/reference/_cli/config.mdx index 356f7fa9658..0e62403dec6 100644 --- a/apps/reference/_cli/config.mdx +++ b/apps/reference/_cli/config.mdx @@ -1,6 +1,7 @@ --- id: config title: Configuration +toc_max_heading_level: 2 --- @@ -17,19 +18,18 @@ This file is located in the `supabase` folder under `supabase/config.toml`. ## General -### `project_id` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `project_id` | `true` | `` | +### `project_id` A string used to distinguish different Supabase projects on the same host. Defaults to the working directory name when running `supabase init`. -See also: - - + +
@@ -39,53 +39,59 @@ See also: ## API -### `api.port` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `api.port` | `true` | `54321` | +### `api.port` Port to use for the API URL. -See also: + -- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html) - +
### `api.extra_search_path` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `api.extra_search_path` | `true` | `["extensions"]` | - Extra schemas to add to the `search_path` of every request. -See also: + -- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html) - +
### `api.max_rows` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `api.max_rows` | `true` | `1000` | - The maximum number of rows returned from a view, table, or stored procedure. Limits payload size for accidental or malicious requests. -See also: - - -- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html) + +
@@ -95,37 +101,41 @@ See also: ## Database -### `db.port` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `db.port` | `true` | `54322` | +### `db.port` Port to use for the local database URL. -See also: + -- [PostgreSQL configuration](https://postgrest.org/en/stable/configuration.html) - +
### `db.major_version` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `db.major_version` | `true` | `14` | - The database major version to use. This has to be the same as your remote database's. Run `SHOW server_version;` on the remote database to check. -See also: - - -- [PostgreSQL configuration](https://postgrest.org/en/stable/configuration.html) + +
@@ -135,19 +145,18 @@ See also: ## Dashboard -### `studio.port` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `studio.port` | `true` | `54323` | +### `studio.port` Port to use for Supabase Studio. -See also: - - + +
@@ -157,23 +166,25 @@ See also: ## Local Development -### `inbucket.port` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `inbucket.port` | `true` | `54324` | +### `inbucket.port` Port to use for the email testing server web interface. Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface. -See also: - - -- [Inbucket documentation](https://www.inbucket.org) + +
@@ -183,124 +194,135 @@ See also: ## Auth -### `auth.site_url` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.site_url` | `true` | `"http://localhost:3000"` | +### `auth.site_url` The base URL of your website. Used as an allow-list for redirects and for constructing URLs used in emails. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.additional_redirect_urls` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.additional_redirect_urls` | `true` | `["https://localhost:3000"]` | - A list of _exact_ URLs that auth providers are permitted to redirect to post authentication. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.jwt_expiry` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.jwt_expiry` | `true` | `3600` | - How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one week). -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.enable_signup` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.enable_signup` | `true` | `true` | - Allow/disallow new user signups to your project. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.email.enable_signup` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.email.enable_signup` | `true` | `true` | - Allow/disallow new user signups via email to your project. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.email.double_confirm_changes` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.email.double_confirm_changes` | `true` | `true` | - If enabled, a user will be required to confirm any email change on both the old, and new email addresses. If disabled, only the new email is required to confirm. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.email.enable_confirmations` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.email.enable_confirmations` | `true` | `true` | - If enabled, users need to confirm their email address before signing in. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.external..enabled` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.external..enabled` | `true` | `true` | - Use an external OAuth provider. The full list of providers are: - `apple` @@ -317,43 +339,52 @@ Use an external OAuth provider. The full list of providers are: - `spotify` -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.external..client_id` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.external..client_id` | `true` | `""` | - Client ID for the external OAuth provider. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - +
### `auth.external..secret` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| `auth.external..secret` | `true` | `""` | - Client secret for the external OAuth provider. -See also: + -- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth) - - +
diff --git a/apps/reference/_cli/installing-and-updating.mdx b/apps/reference/_cli/installing-and-updating.mdx new file mode 100644 index 00000000000..4585fd0d0b5 --- /dev/null +++ b/apps/reference/_cli/installing-and-updating.mdx @@ -0,0 +1,70 @@ +--- +id: installing-and-updating +--- + +# Installing and Updating + +## macOS + +### Installing + +Available via [Homebrew](https://brew.sh). To install: + +```sh +brew install supabase/tap/supabase +``` + +### Upgrading + +To upgrade: + +```sh +brew upgrade supabase +``` + +## Windows + +### Installing + +Available via [Scoop](https://scoop.sh). To install: + +```powershell +scoop bucket add supabase https://github.com/supabase/scoop-bucket.git +scoop install supabase +``` + +### Upgrading + +To upgrade: + +```powershell +scoop update supabase +``` + +## Linux + +### Homebrew + +Available via [Homebrew](https://brew.sh) and Linux packages. + +To install: + +```sh +brew install supabase/tap/supabase +``` + +To upgrade: + +```sh +brew upgrade supabase +``` + +### Linux packages + +Linux packages are provided in [Releases](https://github.com/supabase/cli/releases). +To install, download the `.apk`/`.deb`/`.rpm` file depending on your package manager +and run one of the following: + +- `sudo apk add --allow-untrusted <...>.apk` +- `sudo dpkg -i <...>.deb` +- `sudo rpm -i <...>.rpm` diff --git a/apps/reference/_cli/intro.mdx b/apps/reference/_cli/intro.mdx index e11e387e866..bf83f846353 100644 --- a/apps/reference/_cli/intro.mdx +++ b/apps/reference/_cli/intro.mdx @@ -3,8 +3,20 @@ id: intro slug: / sidebar_position: 1 sidebar_label: Supabase CLI +hide_table_of_contents: true --- # Supabase CLI -Manage your Supabase projects. +The Supabase CLI can be found in our [CLI](https://github.com/supabase/cli) repository. + +The CLI is still under heavy development, but it will contain all the functionality for working with Supabase projects and the Supabase platform. + +- [x] Running Supabase locally +- [x] Self-hosting +- [ ] Managing database migrations (in progress) +- [ ] Pushing your local changes to production +- [ ] Manage your Supabase Account +- [ ] Manage your Supabase Projects +- [ ] Generating types directly from your database schema +- [ ] Generating API and validation schemas from your database diff --git a/apps/reference/_cli/release-notes.mdx b/apps/reference/_cli/release-notes.mdx index 77883904adc..e10337f8d04 100644 --- a/apps/reference/_cli/release-notes.mdx +++ b/apps/reference/_cli/release-notes.mdx @@ -4,4 +4,4 @@ id: release-notes # Release Notes -Start your release notes here. \ No newline at end of file +All release notes can be found in the [GitHub Releases page](https://github.com/supabase/cli/releases). diff --git a/apps/reference/_cli/usage.mdx b/apps/reference/_cli/usage.mdx index 92173fd9a22..906f5833b29 100644 --- a/apps/reference/_cli/usage.mdx +++ b/apps/reference/_cli/usage.mdx @@ -1,32 +1,41 @@ --- id: usage title: Usage +toc_max_heading_level: 3 --- - + -Supabase CLI +Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform. - + +

-## Stop the Supabase local development setup {#supabase-stop} +### Stop all local Supabase containers {#supabase-stop} + + -### Usage ```sh supabase stop [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for stop @@ -34,24 +43,31 @@ supabase stop [flags] - +

-## Show status of the Supabase local development setup {#supabase-status} +### Show status of local Supabase containers {#supabase-status} + + -### Usage ```sh supabase status [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for status @@ -59,24 +75,31 @@ supabase status [flags] - +

-## Start the Supabase local development setup {#supabase-start} +### Start containers for Supabase local development {#supabase-start} + + -### Usage ```sh supabase start [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for start @@ -84,32 +107,37 @@ supabase start [flags] - +

## Manage Supabase secrets {#supabase-secrets} - - - -### Usage + -### Available Commands -- supabase-secrets-list + -- supabase-secrets-set -- supabase-secrets-unset +**Available Commands** + + +- supabase secrets list + +- supabase secrets set + +- supabase secrets unset -### Options + + + +**Options** ```sh -h, --help help for secrets @@ -117,24 +145,31 @@ supabase start [flags] - +

-## Unset a secret(s) from the linked Supabase project {#supabase-secrets-unset} +### Unset a secret(s) on Supabase {#supabase-secrets-unset} + + + +Unset a secret(s) from the linked Supabase project. - -### Usage - ```sh supabase secrets unset ... [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for unset @@ -142,24 +177,31 @@ supabase secrets unset ... [flags] - +

-## Set a secret(s) to the linked Supabase project {#supabase-secrets-set} +### Set a secret(s) on Supabase {#supabase-secrets-set} + + + +Set a secret(s) to the linked Supabase project. - -### Usage - ```sh supabase secrets set [flags] ... ``` + -### Options + + + + + +**Options** ```sh --env-file string Read secrets from a .env file. @@ -168,24 +210,31 @@ supabase secrets set [flags] ... - +

-## List all secrets in the linked project {#supabase-secrets-list} +### List all secrets on Supabase {#supabase-secrets-list} + + + +List all secrets in the linked project. - -### Usage - ```sh supabase secrets list [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for list @@ -193,30 +242,35 @@ supabase secrets list [flags] - +

## Manage Supabase projects {#supabase-projects} - - - -### Usage + -### Available Commands -- supabase-projects-create + -- supabase-projects-list + +**Available Commands** + + +- supabase projects create + +- supabase projects list -### Options + + + +**Options** ```sh -h, --help help for projects @@ -224,24 +278,31 @@ supabase secrets list [flags] - +

-## List all projects {#supabase-projects-list} +### List all Supabase projects {#supabase-projects-list} + + + +List all Supabase projects the logged-in user can access. - -### Usage - ```sh supabase projects list [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for list @@ -249,57 +310,70 @@ supabase projects list [flags] - +

-## Create a new project {#supabase-projects-create} +### Create a project on Supabase {#supabase-projects-create} + + -### Usage ```sh -supabase projects create [flags] +supabase projects create [flags] ``` + -### Options + + + + + +**Options** ```sh --db-password string Database password of the project. -h, --help help for create + -i, --interactive Enables interactive mode. --org-id string Organization ID to create the project in. - --plan string Select a plan that suits your needs. Can be "free" or "pro". (default "free") + --plan string Select a plan that suits your needs. (default "free") --region string Select a region close to you for the best performance. ``` - +

## Manage Supabase organizations {#supabase-orgs} - - - -### Usage + -### Available Commands -- supabase-orgs-list + + + +**Available Commands** + + +- supabase orgs list -### Options + + + +**Options** ```sh -h, --help help for orgs @@ -307,24 +381,31 @@ supabase projects create [flags] - +

-## List all organizations the logged-in user belongs {#supabase-orgs-list} +### List all organizations {#supabase-orgs-list} + + + +List all organizations the logged-in user belongs. - -### Usage - ```sh supabase orgs list [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for list @@ -332,28 +413,35 @@ supabase orgs list [flags] - +

## Manage database migration scripts {#supabase-migration} - - - -### Usage + -### Available Commands -- supabase-migration-new + + + +**Available Commands** + + +- supabase migration list + +- supabase migration new -### Options + + + +**Options** ```sh -h, --help help for migration @@ -361,24 +449,31 @@ supabase orgs list [flags] - +

-## Create an empty migration script {#supabase-migration-new} +### Create an empty migration script {#supabase-migration-new} + + -### Usage ```sh supabase migration new [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for new @@ -386,24 +481,64 @@ supabase migration new [flags] - +

-## Authenticate using an access token {#supabase-login} +### List local and remote migrations {#supabase-migration-list} + + + + + + + +```sh +supabase migration list [flags] +``` + + + + + + + + + +**Options** + +```sh + -h, --help help for list + -p, --password string Password to your remote Postgres database. +``` + + + + + +

+ +### Authenticate using an access token {#supabase-login} + + -### Usage ```sh supabase login [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for login @@ -411,50 +546,65 @@ supabase login [flags] - +

-## Link to a Supabase project {#supabase-link} +### Link to a Supabase project {#supabase-link} + + -### Usage ```sh supabase link [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for link + -p, --password string Password to your remote Postgres database. --project-ref string Project ref of the Supabase project. ``` - +

-## Initialize a project to use Supabase CLI {#supabase-init} +### Initialize a local project {#supabase-init} + + -### Usage ```sh supabase init [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for init @@ -462,28 +612,33 @@ supabase init [flags] - +

## Run code generation tools {#supabase-gen} - - - -### Usage + -### Available Commands -- supabase-gen-types + + + +**Available Commands** + + +- supabase gen types -### Options + + + +**Options** ```sh -h, --help help for gen @@ -491,28 +646,33 @@ supabase init [flags] - +

## Generate types from Postgres schema {#supabase-gen-types} - - - -### Usage + -### Available Commands -- supabase-gen-types-typescript + + + +**Available Commands** + + +- supabase gen types typescript -### Options + + + +**Options** ```sh -h, --help help for types @@ -520,25 +680,32 @@ supabase init [flags] - +

-## Generate types for TypeScript. Must specify either --local or --db-url - {#supabase-gen-types-typescript} +### Generate types for TypeScript {#supabase-gen-types-typescript} + + + +Generate types for TypeScript. Must specify either --local or --db-url -### Usage - ```sh supabase gen types typescript [flags] ``` + -### Options + + + + + +**Options** ```sh --db-url string Generate types from a database url. @@ -548,34 +715,39 @@ supabase gen types typescript [flags] - +

## Manage Supabase Edge functions {#supabase-functions} - - - -### Usage + -### Available Commands -- supabase-functions-delete + -- supabase-functions-deploy -- supabase-functions-new +**Available Commands** -- supabase-functions-serve + +- supabase functions delete + +- supabase functions deploy + +- supabase functions new + +- supabase functions serve -### Options + + + +**Options** ```sh -h, --help help for functions @@ -583,24 +755,31 @@ supabase gen types typescript [flags] - +

-## Serve a Function locally {#supabase-functions-serve} +### Serve a Function locally {#supabase-functions-serve} + + -### Usage ```sh supabase functions serve [flags] ``` + -### Options + + + + + +**Options** ```sh --env-file string Path to an env file to be populated to the Function environment. @@ -610,24 +789,31 @@ supabase functions serve [flags] - +

-## Create a new Function locally {#supabase-functions-new} +### Create a new Function locally {#supabase-functions-new} + + -### Usage ```sh supabase functions new [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for new @@ -635,24 +821,31 @@ supabase functions new [flags] - +

-## Deploy a Function to the linked Supabase project {#supabase-functions-deploy} +### Deploy a Function to Supabase {#supabase-functions-deploy} + + + +Deploy a Function to the linked Supabase project. - -### Usage - ```sh supabase functions deploy [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for deploy @@ -662,25 +855,32 @@ supabase functions deploy [flags] - +

-## Delete a Function from the linked Supabase project. This does NOT remove the Function locally. - {#supabase-functions-delete} +### Delete a Function from Supabase {#supabase-functions-delete} + + + +Delete a Function from the linked Supabase project. This does NOT remove the Function locally. -### Usage - ```sh supabase functions delete [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for delete @@ -689,36 +889,41 @@ supabase functions delete [flags] - +

## Manage Postgres databases {#supabase-db} - - - -### Usage + -### Available Commands -- supabase-db-branch + -- supabase-db-diff -- supabase-db-push +**Available Commands** -- supabase-db-remote -- supabase-db-reset +- supabase db branch + +- supabase db diff + +- supabase db push + +- supabase db remote + +- supabase db reset -### Options + + + +**Options** ```sh -h, --help help for db @@ -726,24 +931,31 @@ supabase functions delete [flags] - +

-## Resets the local database to current migrations {#supabase-db-reset} +### Resets the local database to current migrations {#supabase-db-reset} + + -### Usage ```sh supabase db reset [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for reset @@ -751,83 +963,68 @@ supabase db reset [flags] - +

-## Manage remote database connections {#supabase-db-remote} +## Manage remote databases {#supabase-db-remote} + + -### Usage + + + + + +**Available Commands** + + +- supabase db remote changes + +- supabase db remote commit -### Available Commands + - -- supabase-db-remote-changes - -- supabase-db-remote-commit - -- supabase-db-remote-set - - - -### Options +**Options** ```sh - -h, --help help for remote + -h, --help help for remote + -p, --password string Password to your remote Postgres database. ``` - +

-## Set the remote database to push migrations to {#supabase-db-remote-set} +### Commit remote changes as a new migration {#supabase-db-remote-commit} + + -### Usage - -```sh -supabase db remote set [flags] -``` - - - -### Options - -```sh - -h, --help help for set -``` - - - - - -

- -## Commit changes on the remote database since the last pushed migration - {#supabase-db-remote-commit} - - - - -### Usage ```sh supabase db remote commit [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for commit @@ -835,25 +1032,31 @@ supabase db remote commit [flags] - +

-## Print changes on the remote database since the last pushed migration - {#supabase-db-remote-changes} +### Show changes on the remote database {#supabase-db-remote-changes} + + + +Show changes on the remote database since last migration. - -### Usage - ```sh supabase db remote changes [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for changes @@ -861,50 +1064,65 @@ supabase db remote changes [flags] - +

-## Push new migrations to the remote database {#supabase-db-push} +### Push new migrations to the remote database {#supabase-db-push} + + -### Usage ```sh supabase db push [flags] ``` + -### Options + + + + + +**Options** ```sh - --dry-run Print the migrations that would be applied, but don't actually apply them. - -h, --help help for push + --dry-run Print the migrations that would be applied, but don't actually apply them. + -h, --help help for push + -p, --password string Password to your remote Postgres database. ``` - +

-## Diffs the local database for schema changes {#supabase-db-diff} +### Diffs the local database for schema changes {#supabase-db-diff} + + -### Usage ```sh supabase db diff [flags] ``` + -### Options + + + + + +**Options** ```sh -f, --file string Saves schema diff to a file. @@ -915,35 +1133,40 @@ supabase db diff [flags] - +

-## Manage branches. Each branch is associated with a separate database. - {#supabase-db-branch} +## Manage database branches {#supabase-db-branch} + + + +Manage database branches. Each branch is associated with a separate database. -### Usage + + + + +**Available Commands** + + +- supabase db branch create + +- supabase db branch delete + +- supabase db branch list + +- supabase db branch switch -### Available Commands + - -- supabase-db-branch-create - -- supabase-db-branch-delete - -- supabase-db-branch-list - -- supabase-db-branch-switch - - - -### Options +**Options** ```sh -h, --help help for branch @@ -951,24 +1174,31 @@ supabase db diff [flags] - +

-## Switch the active branch {#supabase-db-branch-switch} +### Switch the active branch {#supabase-db-branch-switch} + + -### Usage ```sh supabase db branch switch [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for switch @@ -976,24 +1206,31 @@ supabase db branch switch [flags] - +

-## List branches {#supabase-db-branch-list} +### List branches {#supabase-db-branch-list} + + -### Usage ```sh supabase db branch list [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for list @@ -1001,24 +1238,31 @@ supabase db branch list [flags] - +

-## Delete a branch {#supabase-db-branch-delete} +### Delete a branch {#supabase-db-branch-delete} + + -### Usage ```sh supabase db branch delete [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for delete @@ -1026,26 +1270,36 @@ supabase db branch delete [flags] - +

-## Create a branch {#supabase-db-branch-create} +### Create a branch {#supabase-db-branch-create} + + -### Usage ```sh supabase db branch create [flags] ``` + -### Options + + + + + +**Options** ```sh -h, --help help for create ``` + + + \ No newline at end of file diff --git a/apps/reference/nav/cli_sidebars.js b/apps/reference/nav/cli_sidebars.js index 4180ec512a4..0fe3014b54b 100644 --- a/apps/reference/nav/cli_sidebars.js +++ b/apps/reference/nav/cli_sidebars.js @@ -18,6 +18,7 @@ const sidebars = { sidebar: [ 'intro', + 'installing-and-updating', 'usage', 'config', 'release-notes', diff --git a/apps/reference/src/css/custom.css b/apps/reference/src/css/custom.css index 7722c32a6cd..d256774a480 100644 --- a/apps/reference/src/css/custom.css +++ b/apps/reference/src/css/custom.css @@ -245,6 +245,8 @@ } .markdown p a, +.markdown p a code, +.markdown li a code, .markdown li a { transition: box-shadow 0.1s ease-in-out; padding-bottom: 2px; @@ -252,6 +254,7 @@ box-shadow: var(--custom-primary) 0px -3px 0px -1px inset; } .markdown p a:hover, +.markdown a:hover code, .markdown li a:hover { box-shadow: inset 0 -30px 0 -1px var(--custom-primary); /* text-shadow: 0px 0px 3px var(--custom-primary-darkest); */ diff --git a/apps/www/_blog/2022-08-12-supabase-series-b.mdx b/apps/www/_blog/2022-08-12-supabase-series-b.mdx index 7bee31aaf12..7692b4a45fd 100644 --- a/apps/www/_blog/2022-08-12-supabase-series-b.mdx +++ b/apps/www/_blog/2022-08-12-supabase-series-b.mdx @@ -11,7 +11,7 @@ toc_depth: 3 --- Supabase raised $80M in May, bringing our total funding to $116M. This comes one year after our Series A, and so we're revisiting the plans -we outlined in our [Series A blog post](https://supabase.com/blog/supabase-series-a) and hold ourselves accountable to the promises we made. +we outlined in our [Series A blog post](https://supabase.com/blog/supabase-series-a) tk hold ourselves accountable for the promises we made. ## Where we've been @@ -19,11 +19,11 @@ We shared a few metrics in our Series A post. Since then we've grown a lot. ### Database growth -At Series A we had launched over 50,000 PostgreSQL databases (only on our hosted platform). +At Series A we'd launched over 50,000 PostgreSQL databases (on our hosted platform). ![Series A databases](/images/blog/series-b/databases-2021.png) -Since then, we've grown to over 150,000 PostgreSQL databases. +As of today, we've launched over 150,000 PostgreSQL databases. ![Series B databases](/images/blog/series-b/databases-2022.png) diff --git a/packages/spec/src/docs/cli.ts b/packages/spec/src/docs/cli.ts index 85eddf84d9c..331747f4d75 100644 --- a/packages/spec/src/docs/cli.ts +++ b/packages/spec/src/docs/cli.ts @@ -26,7 +26,20 @@ export default async function gen(inputFileName: string, outputDir: string) { * Versioned Generator */ async function gen_v001(spec: CliSpec, dest: string) { - const commands = spec.commands + let commandMap = new Map(spec.commands.map((item) => [item.id, item])) + + const commands = spec.commands.map((x) => { + const isChild = x.subcommands.length < 1 + const heading = isChild + ? `### ${x.summary} {#${x.id}}` + : `## ${x.summary} {#${x.id}}` + + return { + ...x, + heading, + subcommandList: x.subcommands.map((c) => commandMap.get(c)), + } + }) const content = ejs.render(template, { info: spec.info, diff --git a/packages/spec/src/docs/templates/CliTemplate.ts b/packages/spec/src/docs/templates/CliTemplate.ts index 1f441e96fbf..a381679955e 100644 --- a/packages/spec/src/docs/templates/CliTemplate.ts +++ b/packages/spec/src/docs/templates/CliTemplate.ts @@ -2,40 +2,50 @@ const template = ` --- id: usage title: Usage +toc_max_heading_level: 3 --- - + <%- info.description %> <% commands.forEach(function(command){ %> - +

-## <%- command.summary %> {#<%- command.id %>} +<%- command.heading %> + <%- command.description %> -### Usage +<% if(command.usage){ %> <%- command.usage %> +<% }; %> + + <% if(command.subcommands.length > 0){ %> -### Available Commands +**Available Commands** -<% command.subcommands.forEach(function(subcommand){ %> -- <%- subcommand %> +<% command.subcommandList.forEach(function(subcommand){ %> +- <%- subcommand.title %> <% }); %> <% } %> -### Options + + + +**Options** <%- command.options %> <% }); %> + + `.trim() export default template diff --git a/packages/spec/src/docs/templates/ConfigTemplate.ts b/packages/spec/src/docs/templates/ConfigTemplate.ts index 29e74aa534f..9a4029a1f58 100644 --- a/packages/spec/src/docs/templates/ConfigTemplate.ts +++ b/packages/spec/src/docs/templates/ConfigTemplate.ts @@ -2,6 +2,7 @@ const template = ` --- id: config title: Configuration +toc_max_heading_level: 2 --- @@ -15,20 +16,22 @@ title: Configuration ## <%= section.title %> <% section.parameters.forEach(function(parameter){ %> -### \`<%- parameter.title %>\` -| Parameter | Required | Default | -| :-------- | :------- | :------------------------- | -| \`<%- parameter.title %>\` | \`<%= parameter.required %>\` | \`<%- parameter?.default %>\` | +### \`<%- parameter.title %>\` <%- parameter.description %> -See also: - -<% parameter.links?.forEach(function(link){ %> -- [<%- link.name %>](<%- link.link %>) -<% }); %> +
    +
  • Required: <%= parameter.required %>
  • +
  • Default: <%- parameter?.default ? parameter?.default : 'None' %>
  • <% if(parameter?.links?.length){ %> +
  • +See also: + +
  • +<% } %> +
+
<% }); %> <% }); %>