Skip to content

Commit c43a662

Browse files
NicolappsConvex, Inc.
authored and
Convex, Inc.
committed
docs: remove /docs from absolute Markdown links (#37132)
As indicated by https://docusaurus.io/docs/markdown-features/links, absolute file paths that are relaive to the site directory (i.e. `/npm-packages/docs/`) are not recommended, and it is recommended instead to use paths that are relative to the content root (`/npm-packages/docs/docs/`) instead. I tested manually that links still work with this change. GitOrigin-RevId: fd1738e467b4f7fc075fc9a1525e8db77da73ca8
1 parent 3307fac commit c43a662

File tree

126 files changed

+850
-901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+850
-901
lines changed

npm-packages/docs/docs/ai.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,5 @@ using rigorous evals. You can help by
5757

5858
## Convex MCP Server
5959

60-
[Setup the Convex MCP server](/docs/ai/convex-mcp-server.mdx) to give your AI
61-
coding agent access to your Convex deployment to query and optimize your
62-
project.
60+
[Setup the Convex MCP server](/ai/convex-mcp-server.mdx) to give your AI coding
61+
agent access to your Convex deployment to query and optimize your project.

npm-packages/docs/docs/ai/convex-mcp-server.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Add the following command to your MCP servers configuration:
1717

1818
See editor specific instructions:
1919

20-
- [Cursor](/docs/ai/using-cursor.mdx#setup-the-convex-mcp-server)
21-
- [Windsurf](/docs/ai/using-windsurf.mdx#setup-the-convex-mcp-server)
20+
- [Cursor](/ai/using-cursor.mdx#setup-the-convex-mcp-server)
21+
- [Windsurf](/ai/using-windsurf.mdx#setup-the-convex-mcp-server)
2222

2323
## Available Tools
2424

npm-packages/docs/docs/ai/using-cursor.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ using rigorous evals. You can help by
3030
## Setup the Convex MCP Server
3131

3232
The Convex CLI comes with a
33-
[Convex Model Context Protocol](/docs/ai/convex-mcp-server.mdx) (MCP) server
34-
built in. The Convex MCP server gives your AI coding agent access to the your
35-
Convex deployment to query and optimize your project.
33+
[Convex Model Context Protocol](/ai/convex-mcp-server.mdx) (MCP) server built
34+
in. The Convex MCP server gives your AI coding agent access to the your Convex
35+
deployment to query and optimize your project.
3636

3737
To get started with Cursor, open "Cursor Settings > MCP", click on "Add new
3838
global MCP server", and add a "convex" section to "mcpServers" in the `mcp.json`

npm-packages/docs/docs/ai/using-windsurf.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ using rigorous evals. You can help by
2323
## Setup the Convex MCP Server
2424

2525
The Convex CLI comes with a
26-
[Convex Model Context Protocol](/docs/ai/convex-mcp-server.mdx) (MCP) server
27-
built in. The Convex MCP server gives your AI coding agent access to the your
28-
Convex deployment to query and optimize your project.
26+
[Convex Model Context Protocol](/ai/convex-mcp-server.mdx) (MCP) server built
27+
in. The Convex MCP server gives your AI coding agent access to the your Convex
28+
deployment to query and optimize your project.
2929

3030
To get started with Windsurf, open "Windsurf Settings > Cascade > Model Context
3131
Protocol (MCP) Servers", click on "Add Server", click "Add custom server", and

npm-packages/docs/docs/auth.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ most comprehensive authentication solutions. Integrating another service
2121
provides a ton of functionality like passkeys, two-factor auth, spam protection,
2222
and more on top of the authentication basics.
2323

24-
- [Clerk](/docs/auth/clerk.mdx) is newer and has better Next.js and React Native
24+
- [Clerk](/auth/clerk.mdx) is newer and has better Next.js and React Native
2525
support
26-
- [Auth0](/docs/auth/auth0.mdx) is more established with more bells and whistles
27-
- [Custom Auth Integration](/docs/auth/advanced/custom-auth.mdx) allow any
28-
OpenID Connect-compatible identity provider to be used for authentication
26+
- [Auth0](/auth/auth0.mdx) is more established with more bells and whistles
27+
- [Custom Auth Integration](/auth/advanced/custom-auth.mdx) allow any OpenID
28+
Connect-compatible identity provider to be used for authentication
2929

3030
After you integrate one of these, learn more about accessing authentication
31-
information in [Functions](/docs/auth/functions-auth.mdx) and storing user
32-
information in the [Database](/docs/auth/database-auth.mdx).
31+
information in [Functions](/auth/functions-auth.mdx) and storing user
32+
information in the [Database](/auth/database-auth.mdx).
3333

3434
## Convex Auth
3535

3636
For client-side React and React Native mobile apps you can implement auth
37-
directly in Convex with the [Convex Auth](/docs/auth/convex-auth.mdx) library.
38-
This [npm package](https://github.com/get-convex/convex-auth) runs on your
39-
Convex deployment and helps you build a custom sign-up/sign-in flow via social
40-
identity providers, one-time email or SMS access codes, or via passwords.
37+
directly in Convex with the [Convex Auth](/auth/convex-auth.mdx) library. This
38+
[npm package](https://github.com/get-convex/convex-auth) runs on your Convex
39+
deployment and helps you build a custom sign-up/sign-in flow via social identity
40+
providers, one-time email or SMS access codes, or via passwords.
4141

4242
Convex Auth is in beta (it isn't complete and may change in
4343
backward-incompatible ways) and doesn't provide as many features as third party
@@ -51,7 +51,7 @@ experimental support please [give it a try](https://labs.convex.dev/auth)!
5151

5252
## Debugging
5353

54-
If you run into issues consult the [Debugging](/docs/auth/debug.mdx) guide.
54+
If you run into issues consult the [Debugging](/auth/debug.mdx) guide.
5555

5656
## Service Authentication
5757

npm-packages/docs/docs/auth/advanced/custom-auth.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 3
55
---
66

77
**Note: This is an advanced feature!** We recommend sticking with the
8-
[supported third-party authentication providers](/docs/auth.mdx).
8+
[supported third-party authentication providers](/auth.mdx).
99

1010
Convex can be integrated with any identity provider supporting the
1111
[OpenID Connect](https://openid.net/connect/) protocol. At minimum this means
@@ -15,12 +15,12 @@ exposes the corresponding
1515
[JWKS](https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets).
1616
The ID token is passed from the client to your Convex backend which ensures that
1717
the token is valid and enables you to query the user information embedded in the
18-
token, as described in [Auth in Functions](/docs/auth/functions-auth.mdx).
18+
token, as described in [Auth in Functions](/auth/functions-auth.mdx).
1919

2020
## Server-side integration
2121

22-
Just like with [Clerk](/docs/auth/clerk.mdx) and [Auth0](/docs/auth/auth0.mdx),
23-
the backend needs to be aware of the domain of the Issuer and your application's
22+
Just like with [Clerk](/auth/clerk.mdx) and [Auth0](/auth/auth0.mdx), the
23+
backend needs to be aware of the domain of the Issuer and your application's
2424
specific applicationID for a given identity provider.
2525

2626
Add these to your `convex/auth.config.js` file:
@@ -42,8 +42,8 @@ export default {
4242

4343
The [`ConvexProviderWithAuth`](/api/modules/react#ConvexProviderWithAuth)
4444
component provides a convenient abstraction for building an auth integration
45-
similar to the ones Convex provides for [Clerk](/docs/auth/clerk.mdx) and
46-
[Auth0](/docs/auth/auth0.mdx).
45+
similar to the ones Convex provides for [Clerk](/auth/clerk.mdx) and
46+
[Auth0](/auth/auth0.mdx).
4747

4848
In the following example we build an integration with an imaginary "ProviderX",
4949
whose React integration includes `AuthProviderXReactProvider` and
@@ -113,11 +113,11 @@ utilities for checking the authentication state: the
113113
[`AuthLoading`](/api/modules/react#authloading) helper components.
114114
115115
See
116-
[Logged-in and logged-out views](/docs/auth/clerk.mdx#logged-in-and-logged-out-views)
116+
[Logged-in and logged-out views](/auth/clerk.mdx#logged-in-and-logged-out-views)
117117
for examples of using these.
118118
119119
### Debugging
120120
121-
See [Debugging Authentication](/docs/auth/debug.mdx).
121+
See [Debugging Authentication](/auth/debug.mdx).
122122
123123
<StackPosts query="authentication" />

npm-packages/docs/docs/auth/advanced/custom-jwt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 4
55
---
66

77
**Note: This is an advanced feature!** We recommend sticking with the
8-
[supported third-party authentication providers](/docs/auth.mdx).
8+
[supported third-party authentication providers](/auth.mdx).
99

1010
If your custom auth provider implements the OIDC protocol, it's easiest to
1111
configure it as a [Custom OIDC Provider](/auth/advanced/custom-auth). However,

npm-packages/docs/docs/auth/auth0.mdx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you're using Next.js see the
2424
## Get started
2525

2626
This guide assumes you already have a working React app with Convex. If not
27-
follow the [Convex React Quickstart](/docs/quickstart/react.mdx) first. Then:
27+
follow the [Convex React Quickstart](/quickstart/react.mdx) first. Then:
2828

2929
<StepByStep>
3030
<Step title="Follow the Auth0 React quickstart">
@@ -184,12 +184,11 @@ export default function Badge() {
184184

185185
## User information in functions
186186

187-
See [Auth in Functions](/docs/auth/functions-auth.mdx) to learn about how to
188-
access information about the authenticated user in your queries, mutations and
189-
actions.
187+
See [Auth in Functions](/auth/functions-auth.mdx) to learn about how to access
188+
information about the authenticated user in your queries, mutations and actions.
190189

191-
See [Storing Users in the Convex Database](/docs/auth/database-auth.mdx) to
192-
learn about how to store user information in the Convex database.
190+
See [Storing Users in the Convex Database](/auth/database-auth.mdx) to learn
191+
about how to store user information in the Convex database.
193192

194193
## Configuring dev and prod tenants
195194

@@ -241,8 +240,8 @@ Now switch to the new configuration by running `npx convex deploy`.
241240
To configure your client you can use environment variables as well. The exact
242241
name of the environment variables and the way to refer to them depends on each
243242
client platform (Vite vs Next.js etc.), refer to our corresponding
244-
[Quickstart](/docs/quickstarts.mdx) or the relevant documentation for the
245-
platform you're using.
243+
[Quickstart](/quickstarts.mdx) or the relevant documentation for the platform
244+
you're using.
246245

247246
Change the props to `Auth0Provider` to take in environment variables:
248247

@@ -258,8 +257,8 @@ Change the props to `Auth0Provider` to take in environment variables:
258257
Use the `.env.local` or `.env` file to configure your client when running
259258
locally. The name of the environment variables file depends on each client
260259
platform (Vite vs Next.js etc.), refer to our corresponding
261-
[Quickstart](/docs/quickstarts.mdx) or the relevant documentation for the
262-
platform you're using:
260+
[Quickstart](/quickstarts.mdx) or the relevant documentation for the platform
261+
you're using:
263262

264263
```py title=".env.local"
265264
VITE_AUTH0_DOMAIN="your-domain.us.auth0.com"
@@ -269,7 +268,7 @@ VITE_AUTH0_CLIENT_ID="yourclientid"
269268
**Production configuration**
270269

271270
Set the environment variables in your production environment depending on your
272-
hosting platform. See [Hosting](/docs/production/hosting/hosting.mdx).
271+
hosting platform. See [Hosting](/production/hosting/hosting.mdx).
273272

274273
## Debugging authentication
275274

@@ -283,7 +282,7 @@ contains a list of configured authentication providers. You must run
283282
configuration to your backend.
284283

285284
For more thorough debugging steps, see
286-
[Debugging Authentication](/docs/auth/debug.mdx).
285+
[Debugging Authentication](/auth/debug.mdx).
287286

288287
## Under the hood
289288

npm-packages/docs/docs/auth/clerk.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ See the following sections for the Clerk SDK that you're using:
3434
[React with Convex and Clerk](https://github.com/get-convex/template-react-vite-clerk)
3535

3636
This guide assumes you already have a working React app with Convex. If not
37-
follow the [Convex React Quickstart](/docs/quickstart/react.mdx) first. Then:
37+
follow the [Convex React Quickstart](/quickstart/react.mdx) first. Then:
3838

3939
<StepByStep>
4040
<Step title="Sign up for Clerk">
@@ -195,7 +195,7 @@ follow the [Convex React Quickstart](/docs/quickstart/react.mdx) first. Then:
195195
[Next.js with Convex and Clerk](https://github.com/get-convex/template-nextjs-clerk)
196196

197197
This guide assumes you already have a working Next.js app with Convex. If not
198-
follow the [Convex Next.js Quickstart](/docs/quickstart/nextjs.mdx) first. Then:
198+
follow the [Convex Next.js Quickstart](/quickstart/nextjs.mdx) first. Then:
199199

200200
<StepByStep>
201201
<Step title="Sign up for Clerk">
@@ -438,19 +438,18 @@ follow the [Convex Next.js Quickstart](/docs/quickstart/nextjs.mdx) first. Then:
438438
[Tanstack Start with Convex and Clerk](https://github.com/get-convex/templates/tree/main/template-tanstack-start)
439439

440440
See the
441-
[Tanstack Start with Clerk guide](/docs/client/react/tanstack-start/clerk.mdx)
442-
for more information.
441+
[Tanstack Start with Clerk guide](/client/react/tanstack-start/clerk.mdx) for
442+
more information.
443443

444444
## Next steps
445445

446446
### Accessing user information in functions
447447

448-
See [Auth in Functions](/docs/auth/functions-auth.mdx) to learn about how to
449-
access information about the authenticated user in your queries, mutations and
450-
actions.
448+
See [Auth in Functions](/auth/functions-auth.mdx) to learn about how to access
449+
information about the authenticated user in your queries, mutations and actions.
451450

452-
See [Storing Users in the Convex Database](/docs/auth/database-auth.mdx) to
453-
learn about how to store user information in the Convex database.
451+
See [Storing Users in the Convex Database](/auth/database-auth.mdx) to learn
452+
about how to store user information in the Convex database.
454453

455454
### Accessing user information client-side
456455

@@ -571,7 +570,7 @@ configured authentication providers. You must run `npx convex dev` or
571570
your backend.
572571

573572
For more thorough debugging steps, see
574-
[Debugging Authentication](/docs/auth/debug.mdx).
573+
[Debugging Authentication](/auth/debug.mdx).
575574

576575
## Under the hood
577576

npm-packages/docs/docs/auth/database-auth.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ import WebhookMessages from "!!raw-loader!@site/../demos/users-and-clerk-webhook
1717
import WebhookHook from "!!raw-loader!@site/../demos/users-and-clerk-webhooks/src/useCurrentUser.ts";
1818
import WebhookClient from "!!raw-loader!@site/../demos/users-and-clerk-webhooks/src/App.tsx";
1919

20-
_If you're using [Convex Auth](/docs/auth/convex-auth.mdx) the user information
21-
is already stored in your database. There's nothing else you need to implement._
20+
_If you're using [Convex Auth](/auth/convex-auth.mdx) the user information is
21+
already stored in your database. There's nothing else you need to implement._
2222

2323
You might want to store user information directly in your Convex database, for
2424
the following reasons:
2525

2626
- Your functions need information about other users, not just about the
2727
currently logged-in user
2828
- Your functions need access to information other than the fields available in
29-
the [Open ID Connect JWT](/docs/auth/functions-auth.mdx)
29+
the [Open ID Connect JWT](/auth/functions-auth.mdx)
3030

3131
There are two ways you can choose from for storing user information in your
3232
database (but only the second one allows storing information not contained in
@@ -46,8 +46,8 @@ the JWT):
4646
### (optional) Users table schema
4747

4848
You can define a `"users"` table, optionally with an
49-
[index](/docs/database/reading-data/indexes/indexes.md) for efficient looking up
50-
the users in the database.
49+
[index](/database/reading-data/indexes/indexes.md) for efficient looking up the
50+
users in the database.
5151

5252
In the examples below we will use the `tokenIdentifier` from the
5353
`ctx.auth.getUserIdentity()` to identify the user, but you could use the
@@ -139,8 +139,8 @@ Set _Endpoint URL_ to
139139
`https://<your deployment name>.convex.site/clerk-users-webhook` (note the
140140
domain ends in **`.site`**, not `.cloud`). You can see your deployment name in
141141
the `.env.local` file in your project directory, or on your Convex dashboard as
142-
part of the [Deployment URL](/docs/dashboard/deployments/settings.md). For
143-
example, the endpoint URL could be:
142+
part of the [Deployment URL](/dashboard/deployments/settings.md). For example,
143+
the endpoint URL could be:
144144
`https://happy-horse-123.convex.site/clerk-users-webhook`.
145145

146146
In _Message Filtering_, select **user** for all user events (scroll down or use
@@ -156,8 +156,8 @@ UI), it should start with `whsec_`. Set it as the value of the
156156
### (optional) Users table schema
157157

158158
You can define a `"users"` table, optionally with an
159-
[index](/docs/database/reading-data/indexes/indexes.md) for efficient looking up
160-
the users in the database.
159+
[index](/database/reading-data/indexes/indexes.md) for efficient looking up the
160+
users in the database.
161161

162162
In the examples below we will use the `subject` from the
163163
`ctx.auth.getUserIdentity()` to identify the user, which should be set to the

npm-packages/docs/docs/auth/debug.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ To handle this, you can either:
2424

2525
1. Use the `Authenticated` component from `convex/react` to wrap the component
2626
that includes the `useQuery` call (see the last two steps in the
27-
[Clerk guide](/docs/auth/clerk.mdx#get-started))
27+
[Clerk guide](/auth/clerk.mdx#get-started))
2828
2. Or return `null` or some other "sentinel" value from the query and handle it
2929
on the client
3030

3131
If you are using `fetchQuery` for
32-
[Next.js Server Rendering](/docs/client/react/nextjs/nextjs-server-rendering.mdx),
32+
[Next.js Server Rendering](/client/react/nextjs/nextjs-server-rendering.mdx),
3333
make sure you are explicitly passing in a JWT token as documented
34-
[here](/docs/client/react/nextjs/nextjs-server-rendering.mdx#server-side-authentication).
34+
[here](/client/react/nextjs/nextjs-server-rendering.mdx#server-side-authentication).
3535

3636
If this hasn't helped, follow the steps below to resolve your issue.
3737

@@ -107,9 +107,9 @@ backend, is to inspect the traffic between them.
107107
</p>
108108

109109
- For HTTP based clients (`ConvexHTTPClient` and the
110-
[HTTP API](/docs/http-api/index.md)), select `Fetch/XHR` as the type of
111-
traffic. You should see an individual network request for each function
112-
call, with an `Authorization` header with value `Bearer ` followed by the
110+
[HTTP API](/http-api/index.md)), select `Fetch/XHR` as the type of traffic.
111+
You should see an individual network request for each function call, with
112+
an `Authorization` header with value `Bearer ` followed by the
113113
authentication token.
114114

115115
<p style={{ textAlign: "center" }}>

npm-packages/docs/docs/auth/functions-auth.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ import Fetch from "!!raw-loader!@site/../private-demos/snippets/src/httpAuthCall
1212
_If you're using Convex Auth, see the
1313
[authorization doc](https://labs.convex.dev/auth/authz#use-authentication-state-in-backend-functions)._
1414

15-
Within a Convex [function](/docs/functions.mdx), you can access information
16-
about the currently logged-in user by using the
17-
[`auth`](/api/interfaces/server.Auth) property of the
18-
[`QueryCtx`](/api/interfaces/server.GenericQueryCtx),
15+
Within a Convex [function](/functions.mdx), you can access information about the
16+
currently logged-in user by using the [`auth`](/api/interfaces/server.Auth)
17+
property of the [`QueryCtx`](/api/interfaces/server.GenericQueryCtx),
1918
[`MutationCtx`](/api/interfaces/server.GenericMutationCtx), or
2019
[`ActionCtx`](/api/modules/server#actionctx) object:
2120

0 commit comments

Comments
 (0)