Skip to content

Commit e2f7889

Browse files
authored
docs: fix typos, duplicated words, wrong property names etc. (#12480)
### What? fix typos in doc ### Why? because they are typos ### How? checked manually with the help of AI
1 parent c010d51 commit e2f7889

File tree

22 files changed

+35
-35
lines changed

22 files changed

+35
-35
lines changed

docs/access-control/globals.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const GlobalWithAccessControl: GlobalConfig = {
3939
update: ({ req: { user } }) => {...},
4040

4141
// Version-enabled Globals only
42-
readVersion: () => {...},
42+
readVersions: () => {...},
4343
},
4444
// highlight-end
4545
}
@@ -64,15 +64,15 @@ If a Global supports [Versions](../versions/overview), the following additional
6464

6565
Returns a boolean result or optionally a [query constraint](../queries/overview) which limits who can read this global based on its current properties.
6666

67-
To add read Access Control to a [Global](../configuration/globals), use the `read` property in the [Global Config](../configuration/globals):
67+
To add read Access Control to a [Global](../configuration/globals), use the `access` property in the [Global Config](../configuration/globals):
6868

6969
```ts
7070
import { GlobalConfig } from 'payload'
7171

7272
const Header: GlobalConfig = {
7373
// ...
7474
// highlight-start
75-
read: {
75+
access: {
7676
read: ({ req: { user } }) => {
7777
return Boolean(user)
7878
},

docs/admin/preview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ preview: (doc, { req }) => `${req.protocol}//${req.host}/${doc.slug}` // highlig
6565

6666
The Preview feature can be used to achieve "Draft Preview". After clicking the preview button from the Admin Panel, you can enter into "draft mode" within your front-end application. This will allow you to adjust your page queries to include the `draft: true` param. When this param is present on the request, Payload will send back a draft document as opposed to a published one based on the document's `_status` field.
6767

68-
To enter draft mode, the URL provided to the `preview` function can point to a custom endpoint in your front-end application that sets a cookie or session variable to indicate that draft mode is enabled. This is framework specific, so the mechanisms here very from framework to framework although the underlying concept is the same.
68+
To enter draft mode, the URL provided to the `preview` function can point to a custom endpoint in your front-end application that sets a cookie or session variable to indicate that draft mode is enabled. This is framework specific, so the mechanisms here vary from framework to framework although the underlying concept is the same.
6969

7070
### Next.js
7171

docs/admin/react-hooks.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ return (
605605
textField: {
606606
initialValue: 'Updated text',
607607
valid: true,
608-
value: 'Upddated text',
608+
value: 'Updated text',
609609
},
610610
},
611611
// blockType: "yourBlockSlug",
@@ -875,7 +875,7 @@ Useful to retrieve info about the currently logged in user as well as methods fo
875875
| **`refreshCookie`** | A method to trigger the silent refreshing of a user's auth token |
876876
| **`setToken`** | Set the token of the user, to be decoded and used to reset the user and token in memory |
877877
| **`token`** | The logged in user's token (useful for creating preview links, etc.) |
878-
| **`refreshPermissions`** | Load new permissions (useful when content that effects permissions has been changed) |
878+
| **`refreshPermissions`** | Load new permissions (useful when content that affects permissions has been changed) |
879879
| **`permissions`** | The permissions of the current user |
880880

881881
```tsx
@@ -1143,7 +1143,7 @@ This is useful for scenarios where you need to trigger another fetch regardless
11431143

11441144
Route transitions are useful in showing immediate visual feedback to the user when navigating between pages. This is especially useful on slow networks when navigating to data heavy or process intensive pages.
11451145

1146-
By default, any instances of `Link` from `@payloadcms/ui` will trigger route transitions dy default.
1146+
By default, any instances of `Link` from `@payloadcms/ui` will trigger route transitions by default.
11471147

11481148
```tsx
11491149
import { Link } from '@payloadcms/ui'

docs/authentication/cookies.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ In this scenario, if your cookie was still valid, malicious-intent.com would be
6262

6363
### CSRF Prevention
6464

65-
Define domains that your trust and are willing to accept Payload HTTP-only cookie based requests from. Use the `csrf` option on the base Payload Config to do this:
65+
Define domains that you trust and are willing to accept Payload HTTP-only cookie based requests from. Use the `csrf` option on the base Payload Config to do this:
6666

6767
```ts
6868
// payload.config.ts
@@ -102,8 +102,8 @@ If option 1 isn't possible, then you can get around this limitation by [configur
102102

103103
```
104104
SameSite: None // allows the cookie to cross domains
105-
Secure: true // ensures its sent over HTTPS only
106-
HttpOnly: true // ensures its not accessible via client side JavaScript
105+
Secure: true // ensures it's sent over HTTPS only
106+
HttpOnly: true // ensures it's not accessible via client side JavaScript
107107
```
108108

109109
Configuration example:

docs/authentication/email.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const Customers: CollectionConfig = {
7171

7272
#### generateEmailSubject
7373

74-
Similarly to the above `generateEmailHTML`, you can also customize the subject of the email. The function argument are the same but you can only return a string - not HTML.
74+
Similarly to the above `generateEmailHTML`, you can also customize the subject of the email. The function arguments are the same but you can only return a string - not HTML.
7575

7676
```ts
7777
import type { CollectionConfig } from 'payload'
@@ -178,7 +178,7 @@ The following arguments are passed to the `generateEmailHTML` function:
178178

179179
#### generateEmailSubject
180180

181-
Similarly to the above `generateEmailHTML`, you can also customize the subject of the email. The function argument are the same but you can only return a string - not HTML.
181+
Similarly to the above `generateEmailHTML`, you can also customize the subject of the email. The function arguments are the same but you can only return a string - not HTML.
182182

183183
```ts
184184
import type { CollectionConfig } from 'payload'

docs/authentication/jwt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ const request = await fetch('http://localhost:3000', {
3838

3939
### Omitting The Token
4040

41-
In some cases you may want to prevent the token from being returned from the auth operations. You can do that by setting `removeTokenFromResponse` to `true` like so:
41+
In some cases you may want to prevent the token from being returned from the auth operations. You can do that by setting `removeTokenFromResponses` to `true` like so:
4242

4343
```ts
4444
import type { CollectionConfig } from 'payload'
4545

4646
export const UsersWithoutJWTs: CollectionConfig = {
4747
slug: 'users-without-jwts',
4848
auth: {
49-
removeTokenFromResponse: true, // highlight-line
49+
removeTokenFromResponses: true, // highlight-line
5050
},
5151
}
5252
```

docs/authentication/operations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ query {
6767
}
6868
```
6969

70-
Document access can also be queried on a collection/global basis. Access on a global can queried like `http://localhost:3000/api/global-slug/access`, Collection document access can be queried like `http://localhost:3000/api/collection-slug/access/:id`.
70+
Document access can also be queried on a collection/global basis. Access on a global can be queried like `http://localhost:3000/api/global-slug/access`, Collection document access can be queried like `http://localhost:3000/api/collection-slug/access/:id`.
7171

7272
## Me
7373

docs/authentication/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const Admins: CollectionConfig = {
7171
</Banner>
7272

7373
<Banner type="warning">
74-
**Note:** Auth-enabled Collections with be automatically injected with the
74+
**Note:** Auth-enabled Collections will be automatically injected with the
7575
`hash`, `salt`, and `email` fields. [More
7676
details](../fields/overview#field-names).
7777
</Banner>

docs/authentication/token-data.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords: authentication, config, configuration, documentation, Content Manageme
88

99
During the lifecycle of a request you will be able to access the data you have configured to be stored in the JWT by accessing `req.user`. The user object is automatically appended to the request for you.
1010

11-
### Definining Token Data
11+
### Defining Token Data
1212

1313
You can specify what data gets encoded to the Cookie/JWT-Token by setting `saveToJWT` property on fields within your auth collection.
1414

docs/configuration/collections.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ The following options are available:
177177
#### Edit View Options
178178

179179
```ts
180-
import type { CollectionCOnfig } from 'payload'
180+
import type { CollectionConfig } from 'payload'
181181

182182
export const MyCollection: CollectionConfig = {
183183
// ...
@@ -275,7 +275,7 @@ You can also pass an object to the collection's `graphQL` property, which allows
275275

276276
## TypeScript
277277

278-
You can import types from Payload to help make writing your Collection configs easier and type-safe. There are two main types that represent the Collection Config, `CollectionConfig` and `SanitizeCollectionConfig`.
278+
You can import types from Payload to help make writing your Collection configs easier and type-safe. There are two main types that represent the Collection Config, `CollectionConfig` and `SanitizedCollectionConfig`.
279279

280280
The `CollectionConfig` type represents a raw Collection Config in its full form, where only the bare minimum properties are marked as required. The `SanitizedCollectionConfig` type represents a Collection Config after it has been fully sanitized. Generally, this is only used internally by Payload.
281281

0 commit comments

Comments
 (0)