Skip to content

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

Fix links in new docs (#8312)

Han Qiaob576c6c67154
diff --git a/apps/reference/_cli/intro.mdx b/apps/reference/_cli/intro.mdx
index 8206cb32a50..c5eecf282c8 100644
--- a/apps/reference/_cli/intro.mdx
+++ b/apps/reference/_cli/intro.mdx
@@ -14,7 +14,7 @@ The CLI is still under heavy development, but it will contain all the functional
- Running Supabase locally: [`supabase start`](./cli/usage#supabase-start)
- Managing database migrations: [`supabase migration`](./cli/usage#supabase-migration)
-- Pushing your local changes to production: [`supabase commit`](./cli/usage#supabase-db-remote-commit)
+- CI / CD for releasing to production: [`supabase db push`](./cli/usage#supabase-db-push)
- Manage your Supabase Projects: [`supabase projects`](./cli/usage#supabase-projects)
- Generating types directly from your database schema: [`supabase gen types`](./cli/usage#supabase-gen)
diff --git a/apps/reference/docs/guides/cli/cicd-workflow.mdx b/apps/reference/docs/guides/cli/cicd-workflow.mdx
index d8248681b13..19c9be0728d 100644
--- a/apps/reference/docs/guides/cli/cicd-workflow.mdx
+++ b/apps/reference/docs/guides/cli/cicd-workflow.mdx
@@ -18,7 +18,7 @@ The Supabase CLI also functions as a database migrations tool. In this guide, we
Before you start, here are some prerequisites:
-- [Install the Supabase CLI](https://supabase.com/docs/reference/cli/installing-and-updating)
+- [Install the Supabase CLI](/reference/cli/installing-and-updating)
- Create a Supabase project
- Initialise a local Git repository
@@ -36,7 +36,7 @@ You should see that a new `supabase` directory is created. Then you need to link
```sql
supabase login
-supabase link --project-ref <project-id>
+supabase link --project-ref $PROJECT_ID
```
You can get your `<project-id>` from your project’s dashboard URL:
@@ -321,7 +321,7 @@ After verifying your staging project has successfully migrated, create another P
The `release` job applies all new migration scripts merged in `supabase/migrations` directory to a linked Supabase project. You can control which project the job links to via `PROJECT_ID` environment variable.
-The full example code for this guide is available on our [demo repository](https://github.com/supabase/cli-example).
+The full example code for this guide is available on our [demo repository](https://github.com/supabase/supabase-action-example).
## Troubleshooting
diff --git a/apps/reference/docs/guides/cli/local-development.mdx b/apps/reference/docs/guides/cli/local-development.mdx
index 4424fbebfdd..a6402929f96 100644
--- a/apps/reference/docs/guides/cli/local-development.mdx
+++ b/apps/reference/docs/guides/cli/local-development.mdx
@@ -17,11 +17,11 @@ Before we begin, make sure you have these installed on your local machine:
- Git. [Docs](https://github.com/git-guides/install-git)
- Docker (make sure this is running). [Docs](https://docs.docker.com/engine/install/)
-- Supabase CLI. [Docs](/docs/reference/cli/installing-and-updating)
+- Supabase CLI. [Docs](/reference/cli/installing-and-updating)
### Supabase CLI login
-After installing the Supabase CLI you can [log in](/docs/reference/cli/supabase-login) using your Supabase account (sign up at [app.supabase.com](https://app.supabase.com)).
+After installing the Supabase CLI you can [log in](/reference/cli/usage#supabase-login) using your Supabase account (sign up at [app.supabase.com](https://app.supabase.com)).
```bash
supabase login
@@ -50,7 +50,7 @@ These commands will create an empty folder for your project and start a new git
### Initialize Supabase
-Let's [initialize](/docs/reference/cli/supabase-init) Supabase inside the folder that you created:
+Let's [initialize](/reference/cli/usage#supabase-init) Supabase inside the folder that you created:
```bash
supabase init
@@ -66,12 +66,12 @@ This command will create a `supabase` folder which holds all the configuration f
supabase start
```
-The [start](/docs/reference/cli/supabase-start) command uses Docker to start the open source [services](/docs/#how-it-works) of Supabase.
+The [start](/reference/cli/usage#supabase-start) command uses Docker to start the open source [services](/architecture) of Supabase.
This command may take a while to run if this is the first time using the CLI.
Once all of the Supabase services are running, you'll see an output that contains your local Supabase credentials.
-You can use the [stop](/docs/reference/cli/supabase-stop) command at any time to stop all services.
+You can use the [stop](/reference/cli/usage#supabase-stop) command at any time to stop all services.
### Accessing Services Directly
@@ -107,7 +107,7 @@ http://localhost:54321
All of the services are accessible through the API Gateway [Kong](https://github.com/Kong/kong)).
If you are accessing these services without the client libraries, you may need to pass the client keys as an `Authorization` header.
-You can learn more about these JWT headers in our [Resources](/docs/learn/auth-deep-dive/auth-deep-dive-jwts).
+You can learn more about these JWT headers in our [Resources](/learn/auth-deep-dive/auth-deep-dive-jwts).
```sh
curl 'http://localhost:54321/rest/v1/' \
@@ -146,10 +146,10 @@ create table employees (
);
```
-Now we have the `employees` table in the local database, but how do we incorporate this into migrations? The CLI automatically detects changes by running the [commit](/docs/reference/cli/supabase-db-commit) command:
+Now we have the `employees` table in the local database, but how do we incorporate this into migrations? The CLI automatically detects changes by running the [db diff](/reference/cli/usage#supabase-db-diff) command:
```sh
-supabase db commit create_employees
+supabase db diff create_employees -f create_employees
```
This creates a new migration named `supabase/migrations/<timestamp>_create_employees.sql`, representing any changes we've made to the local database since `supabase start`.
@@ -205,7 +205,7 @@ There are a few commands required to link your project. We are in the process of
:::
-Let's associate your project with your remote project using [supabase link](/docs/guides/local-development).
+Let's associate your project with your remote project using [supabase link](/guides/local-development).
```bash
@@ -221,7 +221,7 @@ This migration captures any changes required for your local database to match th
### Deploying Database changes
-You can deploy any local database migrations using [`db push`](/docs/reference/cli/supabase-db-push):
+You can deploy any local database migrations using [`db push`](/reference/cli/usage#supabase-db-push):
```sh
supabase db push
@@ -229,7 +229,7 @@ supabase db push
### Deploying Edge Functions
-You can deploy any Edge Functions using [`functions deploy`](/docs/reference/cli/supabase-functions-deploy):
+You can deploy any Edge Functions using [`functions deploy`](/reference/cli/usage#supabase-functions-deploy):
```sh
supabase functions deploy <function_name>
diff --git a/apps/reference/static/img/guides/cli/deploy.png b/apps/reference/static/img/guides/cli/deploy.png
index 3d17f57c0a2..c865f0c8571 100644
Binary files a/apps/reference/static/img/guides/cli/deploy.png and b/apps/reference/static/img/guides/cli/deploy.png differ
diff --git a/apps/reference/static/img/guides/cli/workflow.png b/apps/reference/static/img/guides/cli/workflow.png
index cad4707b73e..f23f1c21905 100644
Binary files a/apps/reference/static/img/guides/cli/workflow.png and b/apps/reference/static/img/guides/cli/workflow.png differ