Commit Graph
4 Commits
Author SHA1 Message Date
Miranda Limonczenko 07e69b9737 docs: fix broken anchor links (#52181)
## Problem

A full docs E2E run with the anchor check from #52174 found 58 broken
anchor links on 53 guide pages. Most point to renamed or removed
headings. Fixing them sets a baseline of zero for the IA restructure.

Closes DOCS-1516

## Solution

- Retarget each link to the section that covers it today, verified on
production.
- Add a custom id where links already use a hand-written slug, such as
`#phx_join`.
- Drop the anchor where no section fits.

## Preview links

Rows with an anchor link straight to a new custom id, which is broken on
live and works on the preview. For the rest, search the page for the
phrase to find the changed link.

| Live | Preview | Search for | Change |
| --- | --- | --- | --- |
|
[with-react](https://supabase.com/docs/guides/getting-started/tutorials/with-react)
|
[with-react](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/getting-started/tutorials/with-react)
| Row Level Security | `auth#row-level-security` →
`database/postgres/row-level-security` (20 links, 15 files) |
| [nextjs](https://supabase.com/docs/guides/auth/quickstarts/nextjs) |
[nextjs](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/nextjs)
| Supabase Auth docs | `auth#authentication` → `auth` |
| [astrojs](https://supabase.com/docs/guides/auth/quickstarts/astrojs) |
[astrojs](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/astrojs)
| Supabase Auth docs | `auth#authentication` → `auth` |
|
[custom-domains](https://supabase.com/docs/guides/platform/custom-domains)
|
[custom-domains](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/custom-domains)
| Owner or Admin permissions | `access-control#manage-team-members` →
`#manage-organization-members` |
|
[network-restrictions](https://supabase.com/docs/guides/platform/network-restrictions)
|
[network-restrictions](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/network-restrictions)
| Owner or Admin permissions | `access-control#manage-team-members` →
`#manage-organization-members` |
|
[postgres-connection-logging](https://supabase.com/docs/guides/platform/postgres-connection-logging)
|
[postgres-connection-logging](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/postgres-connection-logging)
| Owner or Admin permissions | `access-control#manage-team-members` →
`#manage-organization-members` |
|
[ssl-enforcement](https://supabase.com/docs/guides/platform/ssl-enforcement)
|
[ssl-enforcement](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/ssl-enforcement)
| Owner or Admin permissions | `access-control#manage-team-members` →
`#manage-organization-members` |
|
[with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
|
[with-expo-react-native-social-sign-in](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
| copied earlier | `#get-the-api-keys` → `#get-api-details` |
|
[with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
|
[with-expo-react-native-social-sign-in](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
| Apple Developer Console | `auth-apple#configuration-web` →
`#configuration-web-oauth` |
|
[with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
|
[with-expo-react-native-social-sign-in](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
| Google Sign In | Dropped `#react-native`, a non-default tab |
|
[with-flutter](https://supabase.com/docs/guides/getting-started/tutorials/with-flutter)
|
[with-flutter](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/getting-started/tutorials/with-flutter)
| copied earlier | `#get-the-api-keys` → `#get-api-details` |
|
[going-to-prod](https://supabase.com/docs/guides/ai/going-to-prod#hnsw-understanding-efconstruction--efsearch--and-m)
|
[going-to-prod](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/ai/going-to-prod#hnsw-understanding-efconstruction--efsearch--and-m)
| HNSW, understanding | Custom id matching the links from
`ai/choosing-compute-addon` |
|
[rag-with-permissions](https://supabase.com/docs/guides/ai/rag-with-permissions)
|
[rag-with-permissions](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/ai/rag-with-permissions)
| query plan analyzer |
`platform/performance#optimizing-poor-performing-queries` →
`database/query-optimization#analyze-the-query-plan` |
|
[ivf-indexes](https://supabase.com/docs/guides/ai/vector-indexes/ivf-indexes)
|
[ivf-indexes](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/ai/vector-indexes/ivf-indexes)
| Distance operators | `#distance-operators` →
`ai/vector-indexes#distance-operators` |
|
[custom-claims-and-role-based-access-control-rbac](https://supabase.com/docs/guides/api/custom-claims-and-role-based-access-control-rbac)
|
[custom-claims-and-role-based-access-control-rbac](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/api/custom-claims-and-role-based-access-control-rbac)
| local development | `auth-hooks#local-development` → `#developing` |
|
[native-mobile-deep-linking](https://supabase.com/docs/guides/auth/native-mobile-deep-linking)
|
[native-mobile-deep-linking](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/native-mobile-deep-linking)
| password reset |
`passwords#resetting-a-users-password-forgot-password` →
`#resetting-a-password` |
|
[mcp-authentication](https://supabase.com/docs/guides/auth/oauth-server/mcp-authentication)
|
[mcp-authentication](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/oauth-server/mcp-authentication)
| authorization UI | `getting-started#build-your-authorization-endpoint`
→ `#build-your-authorization-ui` |
| [passwords](https://supabase.com/docs/guides/auth/passwords) |
[passwords](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/passwords)
| implicit flow | `sessions#implicit-flow`, `sessions#pkce-flow` →
`sessions/implicit-flow`, `sessions/pkce-flow` |
| [redirect-urls](https://supabase.com/docs/guides/auth/redirect-urls) |
[redirect-urls](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/redirect-urls)
| third-party providers | Dropped the `auth-signinwithoauth` example
anchor |
| [users](https://supabase.com/docs/guides/auth/users) |
[users](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/auth/users)
| User Identity | `auth-identity-linking#the-user-identity` →
`identities#the-user-identity-object` |
|
[upgrading](https://supabase.com/docs/guides/platform/upgrading#upgrading-to-pg_graphql-160)
|
[upgrading](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/upgrading#upgrading-to-pg_graphql-160)
| Upgrading to pg_graphql | Custom id matching the link from
`database/extensions/pg_graphql` |
| [import-data](https://supabase.com/docs/guides/database/import-data) |
[import-data](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/import-data)
| disk management | `database-size#disk-management` → `#disk-size` |
| [multigres](https://supabase.com/docs/guides/database/multigres) |
[multigres](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/multigres)
| Private Alpha | Dropped the link. `getting-started/features` redirects
to `/features` |
|
[data-deletion](https://supabase.com/docs/guides/database/postgres/data-deletion)
|
[data-deletion](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/postgres/data-deletion)
| Check for blocked queries | `#monitoring-locks` →
`#check-for-blocked-queries` |
|
[postgres-log-config](https://supabase.com/docs/guides/database/postgres/postgres-log-config)
|
[postgres-log-config](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/database/postgres/postgres-log-config)
| Supavisor | `connecting-to-postgres#poolers` →
`pooling-and-limits#shared-pooler` and `#dedicated-pooler` |
|
[partner-catalog](https://supabase.com/docs/guides/integrations/partner-catalog)
|
[partner-catalog](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/integrations/partner-catalog)
| Project GraphQL API | `api#graphql-api-overview` → `graphql` |
|
[vercel-marketplace](https://supabase.com/docs/guides/integrations/vercel-marketplace)
|
[vercel-marketplace](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/integrations/vercel-marketplace)
| How your Vercel team maps | `#permissions` →
`#how-your-vercel-team-maps-to-supabase` |
|
[managing-config](https://supabase.com/docs/guides/local-development/managing-config)
|
[managing-config](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/local-development/managing-config)
| Managing secrets for branches |
`branching#managing-secrets-for-branches` →
`branching/configuration#managing-secrets-for-branches` |
| [reports](https://supabase.com/docs/guides/observability/reports) |
[reports](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/observability/reports)
| Query Performance Advisory | `performance#examine-query-performance` →
`#examining-query-performance` |
| [backups](https://supabase.com/docs/guides/platform/backups) |
[backups](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/backups)
| legacy logical backup | `backup-restore#backup-database-using-the-cli`
→ `#back-up-database-using-the-cli` |
|
[backups](https://supabase.com/docs/guides/platform/backups#pitr-restoration-process)
|
[backups](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/backups#pitr-restoration-process)
| Restoration process | Custom id matching the link from
`read-replicas/getting-started` |
|
[branching](https://supabase.com/docs/guides/platform/manage-your-usage/branching)
|
[branching](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/manage-your-usage/branching)
| persistent branches | `branching#persistent-branches` →
`#how-branching-works` |
|
[point-in-time-recovery](https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery)
|
[point-in-time-recovery](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/manage-your-usage/point-in-time-recovery)
| backup frequency | `backups#frequency-of-backups` → `backups` |
|
[read-replicas](https://supabase.com/docs/guides/platform/read-replicas)
|
[read-replicas](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/platform/read-replicas)
| IPv4 add-on | `ipv4-address#read-replicas` →
`#read-replicas-and-ipv4-add-on` |
|
[protocol](https://supabase.com/docs/guides/realtime/protocol#access-token)
|
[protocol](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/protocol#access-token)
| access_token | Custom id matching the link from
`realtime/authorization` |
|
[postgres-changes](https://supabase.com/docs/guides/realtime/postgres-changes#negating-a-filter-not)
|
[postgres-changes](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/postgres-changes#negating-a-filter-not)
| Negating a filter | Custom id matching the existing in-page link |
|
[protocol](https://supabase.com/docs/guides/realtime/protocol#phx_join)
|
[protocol](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/protocol#phx_join)
| phx_join | Custom id matching the existing in-page link |
| [reports](https://supabase.com/docs/guides/realtime/reports) |
[reports](https://docs-git-docs-fix-broken-anchors-supabase.vercel.app/docs/guides/realtime/reports)
| Broadcast via REST API | `broadcast#broadcast-via-rest-api` →
`#broadcast-using-the-rest-api` |

<details>
<summary>The 15 files with Row Level Security links</summary>

- `_partials/quickstart_intro.mdx`, used by the framework tutorials
- `auth/phone-login`
- `auth/quickstarts/with-expo-react-native-social-sign-in`
- `database/postgres/column-level-security`
- `getting-started/tutorials/`: `with-flutter`, `with-ionic-angular`,
`with-ionic-react`, `with-ionic-vue`, `with-kotlin`, `with-nuxt-3`,
`with-redwoodjs`, `with-solidjs`, `with-svelte`, `with-swift`,
`with-vue-3`

</details>

## Review instructions

1. Open a few live and preview links side by side, and click the changed
link on each to confirm the preview lands on the right section.
2. From a checkout of `docs/e2e-anchor-links`, run the anchor check
against the preview with the changed pages, as described in
`e2e/docs/README.md`:
`DOCS_E2E_PAGE_PATHS=<changed /docs/... paths>
PLAYWRIGHT_BASE_URL=https://docs-git-docs-fix-broken-anchors-supabase.vercel.app
pnpm exec playwright test --grep-invert @a11y`
3. Confirm the anchor check reports no failures.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-10-23 12:24:57 -07:00
Miranda Limonczenko abbf667084 fix(docs) Resolve local link paths caused that have redirects (#48453)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## Problem

The Docs E2E link checker found broken links throughout docs, starting
with `phone-login.mdx` pointing to `/docs/guides/cli/config` (404).

Old links like `/docs/guides/cli/config` still work on the live site
because `supabase.com` has redirects set up for them, but these links
break on the docs preview site, which is what the E2E check tests
against. These issues look clean on the live site, and I didn't catch
them in my first pass because I was testing production instead of the
preview.

The E2E check only tests the ~20 pages a given PR happens to touch, so
fixing the pages it flagged kept exposing more of the same problem one
page at a time as each fix pulled in a new file. To stop chasing this
incrementally, I cross-referenced every `/docs/guides/*` and
`/docs/reference/*` redirect source in `apps/www/lib/redirects.js`
against actual usage across all of `apps/docs`, and verified each
candidate against the live preview.

## Solution

Rather than updating the Docs E2E link checker, this PR resolves the
links. **Why:** we own these docs, so keeping the links clean without
redirects is keeping the house maintained. See [Broken Window
Theory](https://blog.codinghorror.com/the-broken-window-theory/).

Updated every link still using an old path to point straight at the
current page instead of relying on a redirect. This covers old links
like:

- `/docs/guides/cli/config` →
`/docs/guides/local-development/cli/config`
- `/docs/guides/cli/getting-started` →
`/docs/guides/local-development/cli/getting-started`
- `/docs/guides/cli/local-development` →
`/docs/guides/local-development/database-migrations`
- `/docs/guides/cli/managing-environments` →
`/docs/guides/deployment/managing-environments`
- `/docs/guides/cli/seeding-your-database` →
`/docs/guides/local-development/seeding-your-database`
- bare `/docs/guides/cli` → `/docs/guides/local-development`
- `/docs/guides/platform/compute-add-ons` →
`/docs/guides/platform/compute-and-disk`
- `/docs/guides/platform/shared-responsibility-model` →
`/docs/guides/deployment/shared-responsibility-model`
- `/docs/guides/database` → `/docs/guides/database/overview`
- `/docs/reference/javascript`, `/docs/reference/dart`,
`/docs/reference/kotlin`, `/docs/reference/python`,
`/docs/reference/csharp` → their `/introduction` pages (the redirect's
own destination, `/start`, turned out to be dead even on production — a
separate bug in `redirects.js` I didn't touch here)
- and about 35 more of the same pattern, listed in the commit messages

Also fixed a handful of dead heading anchors found along the way (links
that resolve to the right page but point at a `#section` that got
renamed or moved), including the original `#bigquery` anchor and a few
in `connecting-to-postgres.mdx` where content moved to its own dedicated
page.

Left alone on purpose:
- `content/guides/cli.mdx` — this page has no route in the docs app at
all (no `app/guides/cli/` directory), so it 404s even in production
before the `www` redirect ever fires. Fixing its internal link wouldn't
change that; it needs an actual routing/content decision, not a link
fix.
- A few candidates that already resolve fine as-is (`pg_partman`, bare
`/docs/reference/api`, bare `/docs/reference/cli`) — confirmed via curl,
left untouched.

## Manual testing

1. Confirmed every new link target actually exists by checking the
destination file/page and matching heading anchors.
2. Cross-referenced every `/docs/guides/*` and `/docs/reference/*`
redirect source in `apps/www/lib/redirects.js` against real usage in
`apps/docs`, and curl-verified each old path (404) and new path (200)
against the live PR preview before fixing it.
3. Ran the Docs E2E link checker locally against changed pages.
4. Spot-checked the original broken link from CI
(`/docs/guides/cli/config`) to confirm it now points to a working page.
2026-07-29 14:47:17 -07:00
Chris ChinchillaandCharis e6e24aadad docs: Update user management docs for next JS (#37664)
* Draft

* Update text for guide

* Update text for guide

* Update code for newer next js versions

* Final small change

* Update apps/docs/content/_partials/project_setup.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Changes from review

* Use project name in tutorial text

* Fix up inclusion

* Fix inclusion

* Prettier

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-08-07 08:45:39 +00:00
Charis 2709fa4a3e feat: pre-compile-time partials (#34028)
Partials are currently defined via MDX includes. This PR switches to pre-compile-time partials, which have a new syntax:

```
<$Partial path="path/to/file.mdx" />
```

## Rationale

This produces two improvements:

1. Partial substitution can occur in pipelines that don't use MDX compilation. For example, we can now do partial substitution before building the search index, so partial content will also be indexed.
2. After the App Router migration, the MDXProviders should've been deprecated, but were kept around for the sole reason of making partials work, and leading to us shipping unnecessary client-side code. We get a minor decrease in overall client bundle size (5.74 MB to 5.6 MB) by getting rid of the Providers.

## Breaking changes

Besides the change to partial syntax, the arguments are also less powerful than before because we are doing string substitution and don't have the full power of JS. Defining string variables is still possible (documented in the Contributing guide), and since that's all we actually do in practice, this shouldn't be too cumbersome. There is always the escape hatch of making a custom component for more complex content reuse cases.
2025-03-18 10:37:39 -04:00