Skip to content

Commit 8952662

Browse files
authored
docs: fix links and formatting (payloadcms#10835)
### What? This PR fixes many links in the docs as well as a few formatting and grammar issues. ### Why? To properly link users to the correct destination in the docs and present well-formatted docs. ### How? Changes to a few files in `docs/`
1 parent a835518 commit 8952662

File tree

18 files changed

+32
-30
lines changed

18 files changed

+32
-30
lines changed

Diff for: CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Each test directory is split up in this way specifically to reduce friction when
6363

6464
The following command will start Payload with your config: `pnpm dev my-test-dir`. Example: `pnpm dev fields` for the test/`fields` test suite. This command will start up Payload using your config and refresh a test database on every restart. If you're using VS Code, the most common run configs are automatically added to your editor - you should be able to find them in your VS Code launch tab.
6565

66-
By default, payload will [automatically log you in](https://payloadcms.com/docs/authentication/overview#admin-autologin) with the default credentials. To disable that, you can either pass in the --no-auto-login flag (example: `pnpm dev my-test-dir --no-auto-login`) or set the `PAYLOAD_PUBLIC_DISABLE_AUTO_LOGIN` environment variable to `false`.
66+
By default, payload will [automatically log you in](https://payloadcms.com/docs/authentication/overview#auto-login) with the default credentials. To disable that, you can either pass in the --no-auto-login flag (example: `pnpm dev my-test-dir --no-auto-login`) or set the `PAYLOAD_PUBLIC_DISABLE_AUTO_LOGIN` environment variable to `false`.
6767

6868
The default credentials are `[email protected]` as E-Mail and `test` as password. These are used in the auto-login.
6969

Diff for: docs/access-control/collections.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ The following arguments are provided to the `delete` function:
261261

262262
If the Collection is used to access the [Admin Panel](../admin/overview#the-admin-user-collection), the `Admin` Access Control function determines whether or not the currently logged in user can access the admin UI.
263263

264-
To add Admin Access Control to a Collection, use the `admin` property in the [Collection Config](../collections/overview):
264+
To add Admin Access Control to a Collection, use the `admin` property in the [Collection Config](../configuration/collections):
265265

266266
```ts
267267
import type { CollectionConfig } from 'payload'

Diff for: docs/admin/components.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Each Custom Component receives the following props by default:
185185
186186
<Banner type="warning">
187187
**Reminder:**
188-
All Custom Components also receive various other props that are specific component being rendered. See [Root Components](#root-components), [Collection Components](../configuration/collections#custom-components), [Global Components](../configuraiton/globals#custom-components), or [Field Components](../fields/overview#custom-components) for a complete list of all default props per component.
188+
All Custom Components also receive various other props that are specific component being rendered. See [Root Components](#root-components), [Collection Components](../configuration/collections#custom-components), [Global Components](../configuration/globals#custom-components), or [Field Components](../fields/overview#custom-components) for a complete list of all default props per component.
189189
</Banner>
190190
191191
### Custom Props
@@ -511,7 +511,7 @@ The following options are available:
511511

512512
As you add more and more Custom Components to your [Admin Panel](./overview), you may find it helpful to add additional [React Context](https://react.dev/learn/scaling-up-with-reducer-and-context)(s). Payload allows you to inject your own context providers in your app so you can export your own custom hooks, etc.
513513

514-
To add a Custom Provider, use the `admin.components.providers` property in your [Payload Config](../getting-started/overview):
514+
To add a Custom Provider, use the `admin.components.providers` property in your [Payload Config](../configuration/overview):
515515

516516
```ts
517517
import { buildConfig } from 'payload'
@@ -546,5 +546,5 @@ export const useMyCustomContext = () => useContext(MyCustomContext)
546546
```
547547

548548
<Banner type="warning">
549-
**Reminder:**React Context exists only within Client Components. This means they must include the `use client` directive at the top of their files and cannot contain server-only code. To use a Server Component here, simply _wrap_ your Client Component with it.
549+
**Reminder:** React Context exists only within Client Components. This means they must include the `use client` directive at the top of their files and cannot contain server-only code. To use a Server Component here, simply _wrap_ your Client Component with it.
550550
</Banner>

Diff for: docs/authentication/operations.mdx

+4-2
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Payload comes with built-in forgot password functionality. Submitting an email a
312312

313313
The link to reset the user's password contains a token which is what allows the user to securely reset their password.
314314

315-
By default, the Forgot Password operations send users to the [Admin Panel](../admin/overview) to reset their password, but you can customize the generated email to send users to the frontend of your app instead by [overriding the email HTML](/docs/authentication/overview#forgot-password).
315+
By default, the Forgot Password operations send users to the [Admin Panel](../admin/overview) to reset their password, but you can customize the generated email to send users to the frontend of your app instead by [overriding the email HTML](/docs/authentication/email#forgot-password).
316316

317317
**Example REST API Forgot Password**:
318318

@@ -348,7 +348,9 @@ const token = await payload.forgotPassword({
348348
})
349349
```
350350

351-
**Note:** if you do not have a `config.serverURL` set, Payload will attempt to create one for you if the `forgot-password` operation was triggered via REST or GraphQL by looking at the incoming `req`. But this is not supported if you are calling `payload.forgotPassword()` via the Local API. If you do not have a `serverURL` set, you may want to override your `auth.forgotPassword.generateEmailHTML` function to provide a full URL to link the user to a proper reset-password page.
351+
<Banner type="info">
352+
**Note:** if you do not have a `config.serverURL` set, Payload will attempt to create one for you if the `forgot-password` operation was triggered via REST or GraphQL by looking at the incoming `req`. But this is not supported if you are calling `payload.forgotPassword()` via the Local API. If you do not have a `serverURL` set, you may want to override your `auth.forgotPassword.generateEmailHTML` function to provide a full URL to link the user to a proper reset-password page.
353+
</Banner>
352354

353355
<Banner type="success">
354356
**Tip:**

Diff for: docs/authentication/overview.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ If set to `true`, an email address is required when creating a new user. If set
132132

133133
For testing and demo purposes you may want to skip forcing the user to login in order to access your application. Typically, all users should be required to login, however, you can speed up local development time by enabling auto-login.
134134

135-
To enable auto-login, set the `autoLogin` property in the [Admin Config](../configuration/admin):
135+
To enable auto-login, set the `autoLogin` property in the [Payload Config](../admin/overview#admin-options):
136136

137137
```ts
138138
import { buildConfig } from 'payload'

Diff for: docs/configuration/collections.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default buildConfig({
3232

3333
## Config Options
3434

35-
It's often best practice to write your Collections in separate files and then import them into the main [Payload Config](../overview).
35+
It's often best practice to write your Collections in separate files and then import them into the main [Payload Config](./overview).
3636

3737
Here is what a simple Collection Config might look like:
3838

@@ -95,7 +95,7 @@ Fields define the schema of the Documents within a Collection. To learn more, go
9595

9696
## Admin Options
9797

98-
The behavior of Collections within the [Admin Panel](../admin/overview) can be fully customized to fit the needs of your application. This includes grouping or hiding their navigation links, adding [Custom Components](./components), selecting which fields to display in the List View, and more.
98+
The behavior of Collections within the [Admin Panel](../admin/overview) can be fully customized to fit the needs of your application. This includes grouping or hiding their navigation links, adding [Custom Components](../admin/components), selecting which fields to display in the List View, and more.
9999

100100
To configure Admin Options for Collections, use the `admin` property in your Collection Config:
101101

Diff for: docs/configuration/globals.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The following options are available:
8080
| **`lockDocuments`** | Enables or disables document locking. By default, document locking is enabled. Set to an object to configure, or set to `false` to disable locking. [More details](../admin/locked-documents). |
8181
| **`slug`** * | Unique, URL-friendly string that will act as an identifier for this Global. |
8282
| **`typescript`** | An object with property `interface` as the text used in schema generation. Auto-generated from slug if not defined. |
83-
| **`versions`** | Set to true to enable default options, or configure with object properties. [More details](../versions/overview#globals-config). |
83+
| **`versions`** | Set to true to enable default options, or configure with object properties. [More details](../versions/overview#global-config). |
8484

8585
_* An asterisk denotes that a property is required._
8686

Diff for: docs/configuration/overview.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The Payload Config is strongly typed and ties directly into Payload's TypeScript
2424

2525
<Banner type="success">
2626
**Tip:**
27-
The location of your Payload Config can be customized. [More details](#customizing--automating-config-location-detection).
27+
The location of your Payload Config can be customized. [More details](#customizing-the-config-location).
2828
</Banner>
2929

3030
## Config Options
@@ -73,7 +73,7 @@ The following options are available:
7373
| **`collections`** | An array of Collections for Payload to manage. [More details](./collections). |
7474
| **`compatibility`** | Compatibility flags for earlier versions of Payload. [More details](#compatibility-flags). |
7575
| **`globals`** | An array of Globals for Payload to manage. [More details](./globals). |
76-
| **`cors`** | Cross-origin resource sharing (CORS) is a mechanism that accept incoming requests from given domains. You can also customize the `Access-Control-Allow-Headers` header. [More details](#cross-origin-resource-sharing-cors). |
76+
| **`cors`** | Cross-origin resource sharing (CORS) is a mechanism that accept incoming requests from given domains. You can also customize the `Access-Control-Allow-Headers` header. [More details](#cors). |
7777
| **`localization`** | Opt-in to translate your content into multiple locales. [More details](./localization). |
7878
| **`logger`** | Logger options, logger options with a destination stream, or an instantiated logger instance. [More details](https://getpino.io/#/docs/api?id=options). |
7979
| **`loggingLevels`** | An object to override the level to use in the logger for Payload's errors. |
@@ -181,7 +181,7 @@ If none was in either location, Payload will finally check the `dist` directory.
181181

182182
### Customizing the Config Location
183183

184-
In addition to the above automated detection, you can specify your own location for the Payload Config. This can be useful in situations where your config is not in a standard location, or you wish to switch between multiple configurations. To do this, Payload exposes an [Environment Variable](..environment-variables) to bypass all automatic config detection.
184+
In addition to the above automated detection, you can specify your own location for the Payload Config. This can be useful in situations where your config is not in a standard location, or you wish to switch between multiple configurations. To do this, Payload exposes an [Environment Variable](./environment-variables) to bypass all automatic config detection.
185185

186186
To use a custom config location, set the `PAYLOAD_CONFIG_PATH` environment variable:
187187

Diff for: docs/database/migrations.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,5 @@ export default buildConfig({
274274
Passing your migrations as shown above will tell Payload, in production only, to execute any migrations that need to be run prior to completing the initialization of Payload. This is ideal for long-running services where Payload will only be initialized at startup.
275275

276276
<Banner type="warning">
277-
Warning - if Payload is instructed to run migrations in production, this may slow down serverless cold starts on platforms such as Vercel. Generally, this option should only be used for long-running servers / containers.
277+
**Warning:** if Payload is instructed to run migrations in production, this may slow down serverless cold starts on platforms such as Vercel. Generally, this option should only be used for long-running servers / containers.
278278
</Banner>

Diff for: docs/database/postgres.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default buildConfig({
5252

5353
<Banner type="info">
5454
**Note:**
55-
If you're using `vercelPostgresAdapter` your `process.env.POSTGRES_URL` or `pool.connectionString` points to a local database (e.g hostname has `localhost` or `127.0.0.1`) we use the `pg` module for pooling instead of `@vercel/postgres`. This is because `@vercel/postgres` doesn't work with local databases, if you want to disable that behavior, you can pass `forceUseVercelPostgres: true` to adapter's 'args and follow [Vercel guide](https://vercel.com/docs/storage/vercel-postgres/local-development#option-2:-local-postgres-instance-with-docker) for a Docker Neon DB setup.
55+
If you're using `vercelPostgresAdapter` your `process.env.POSTGRES_URL` or `pool.connectionString` points to a local database (e.g hostname has `localhost` or `127.0.0.1`) we use the `pg` module for pooling instead of `@vercel/postgres`. This is because `@vercel/postgres` doesn't work with local databases, if you want to disable that behavior, you can pass `forceUseVercelPostgres: true` to the adapter's args and follow [Vercel guide](https://vercel.com/docs/storage/vercel-postgres/local-development#option-2:-local-postgres-instance-with-docker) for a Docker Neon DB setup.
5656
</Banner>
5757

5858
## Options

Diff for: docs/fields/array.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The Array Field inherits all of the default options from the base [Field Admin C
8484
| Option | Description |
8585
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
8686
| **`initCollapsed`** | Set the initial collapsed state |
87-
| **`components.RowLabel`** | React component to be rendered as the label on the array row. [Example](#example-of-a-custom-rowlabel-component) |
87+
| **`components.RowLabel`** | React component to be rendered as the label on the array row. [Example](#row-label) |
8888
| **`isSortable`** | Disable order sorting by setting this value to `false` |
8989

9090
## Example

Diff for: docs/fields/join.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ powerful Admin UI.
123123

124124
| Option | Description |
125125
|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
126-
| **`name`** * | To be used as the property name when retrieved from the database. [More](./overview#field-names) |
127-
| **`collection`** * | The `slug`s having the relationship field. |
128-
| **`on`** * | The name of the relationship or upload field that relates to the collection document. Use dot notation for nested paths, like 'myGroup.relationName'. |
126+
| **`name`** * | To be used as the property name when retrieved from the database. [More](./overview#field-names) |
127+
| **`collection`** * | The `slug`s having the relationship field. |
128+
| **`on`** * | The name of the relationship or upload field that relates to the collection document. Use dot notation for nested paths, like 'myGroup.relationName'. |
129129
| **`where`** | A `Where` query to hide related documents from appearing. Will be merged with any `where` specified in the request. |
130-
| **`maxDepth`** | Default is 1, Sets a maximum population depth for this field, regardless of the remaining depth when this field is reached. [Max Depth](/docs/getting-started/concepts#field-level-max-depth). |
130+
| **`maxDepth`** | Default is 1, Sets a maximum population depth for this field, regardless of the remaining depth when this field is reached. [Max Depth](../queries/depth#max-depth). |
131131
| **`label`** | Text used as a field label in the Admin Panel or an object with keys for each language. |
132132
| **`hooks`** | Provide Field Hooks to control logic for this field. [More details](../hooks/fields). |
133133
| **`access`** | Provide Field Access Control to denote what users can see and do with this field's data. [More details](../access-control/fields). |

0 commit comments

Comments
 (0)