From 20ba8588f4dc5b2ce9dc21609536a84205f9451d Mon Sep 17 00:00:00 2001 From: akhrarovsaid Date: Wed, 30 Oct 2024 12:34:21 -0400 Subject: [PATCH] docs: fix docs-wide spelling errors and formatting issues --- docs/access-control/overview.mdx | 2 +- docs/admin/hooks.mdx | 2 +- docs/authentication/overview.mdx | 2 +- docs/authentication/token-data.mdx | 2 +- docs/configuration/overview.mdx | 2 +- docs/fields/radio.mdx | 2 +- docs/fields/rich-text.mdx | 6 +----- docs/fields/upload.mdx | 2 +- docs/hooks/context.mdx | 2 +- docs/lexical/migration.mdx | 2 +- docs/plugins/form-builder.mdx | 2 +- docs/queries/select.mdx | 1 + docs/queries/sort.mdx | 2 +- docs/rest-api/overview.mdx | 2 +- docs/upload/overview.mdx | 4 ++-- docs/upload/storage-adapters.mdx | 2 +- 16 files changed, 17 insertions(+), 20 deletions(-) diff --git a/docs/access-control/overview.mdx b/docs/access-control/overview.mdx index 546a886be2d..8aeb847a318 100644 --- a/docs/access-control/overview.mdx +++ b/docs/access-control/overview.mdx @@ -18,7 +18,7 @@ There are many use cases for Access Control, including: - Only allowing public access to posts where a `status` field is equal to `published` - Giving only users with a `role` field equal to `admin` the ability to delete posts - Allowing anyone to submit contact forms, but only logged in users to `read`, `update` or `delete` them -- Restricting a user to only be able to see their own orders, but noone else's +- Restricting a user to only be able to see their own orders, but no-one else's - Allowing users that belong to a certain organization to access only that organization's resources There are three main types of Access Control in Payload: diff --git a/docs/admin/hooks.mdx b/docs/admin/hooks.mdx index 6648399d961..2c494261158 100644 --- a/docs/admin/hooks.mdx +++ b/docs/admin/hooks.mdx @@ -760,7 +760,7 @@ const LinkFromCategoryToPosts: React.FC = () => { ## useLocale -In any Custom Component you can get the selected locale object with the `useLocale` hook. `useLocale`gives you the full locale object, consisting of a `label`, `rtl`(right-to-left) property, and then `code`. Here is a simple example: +In any Custom Component you can get the selected locale object with the `useLocale` hook. `useLocale` gives you the full locale object, consisting of a `label`, `rtl`(right-to-left) property, and then `code`. Here is a simple example: ```tsx 'use client' diff --git a/docs/authentication/overview.mdx b/docs/authentication/overview.mdx index f29eb16de52..fcda566aedb 100644 --- a/docs/authentication/overview.mdx +++ b/docs/authentication/overview.mdx @@ -86,7 +86,7 @@ The following options are available: | **`loginWithUsername`** | Ability to allow users to login with username/password. [More](/docs/authentication/overview#login-with-username) | | **`maxLoginAttempts`** | Only allow a user to attempt logging in X amount of times. Automatically locks out a user from authenticating if this limit is passed. Set to `0` to disable. | | **`removeTokenFromResponses`** | Set to true if you want to remove the token from the returned authentication API responses such as login or refresh. | -| **`strategies`** | Advanced - an array of custom authentification strategies to extend this collection's authentication with. [More details](./custom-strategies). | +| **`strategies`** | Advanced - an array of custom authentication strategies to extend this collection's authentication with. [More details](./custom-strategies). | | **`tokenExpiration`** | How long (in seconds) to keep the user logged in. JWTs and HTTP-only cookies will both expire at the same time. | | **`useAPIKey`** | Payload Authentication provides for API keys to be set on each user within an Authentication-enabled Collection. [More details](./api-keys). | | **`verify`** | Set to `true` or pass an object with verification options to require users to verify by email before they are allowed to log into your app. [More details](./email#email-verification). | diff --git a/docs/authentication/token-data.mdx b/docs/authentication/token-data.mdx index d90c075e022..504ce9f2405 100644 --- a/docs/authentication/token-data.mdx +++ b/docs/authentication/token-data.mdx @@ -6,7 +6,7 @@ desc: Storing data for read on the request object. keywords: authentication, config, configuration, documentation, Content Management System, cms, headless, javascript, node, react, nextjs --- -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 appeneded to the request for you. +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. ### Definining Token Data diff --git a/docs/configuration/overview.mdx b/docs/configuration/overview.mdx index 1dff3e7116a..a5194d88b63 100644 --- a/docs/configuration/overview.mdx +++ b/docs/configuration/overview.mdx @@ -163,7 +163,7 @@ In development mode, if the configuration file is not found at the root, Payload **Production Mode** -In production mode, Payload will first attempt to find the config file in the `outDir` of your `tsconfig.json`, and if not found, will fallback to the `rootDor` directory: +In production mode, Payload will first attempt to find the config file in the `outDir` of your `tsconfig.json`, and if not found, will fallback to the `rootDir` directory: ```json { diff --git a/docs/fields/radio.mdx b/docs/fields/radio.mdx index ddfc1e90cac..5080e54f485 100644 --- a/docs/fields/radio.mdx +++ b/docs/fields/radio.mdx @@ -83,7 +83,7 @@ The Radio Field inherits all of the default options from the base [Field Admin C | Property | Description | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | -| **`layout`** | Allows for the radio group to be styled as a horizonally or vertically distributed list. The default value is `horizontal`. | +| **`layout`** | Allows for the radio group to be styled as a horizontally or vertically distributed list. The default value is `horizontal`. | ## Example diff --git a/docs/fields/rich-text.mdx b/docs/fields/rich-text.mdx index 1c36ccadde3..d4982b48239 100644 --- a/docs/fields/rich-text.mdx +++ b/docs/fields/rich-text.mdx @@ -25,11 +25,7 @@ Right now, Payload is officially supporting two rich text editors: Consistent with Payload's goal of making you learn as little of Payload as possible, customizing - and using the Rich Text Editor does not involve learning how to develop for a - {' '} - Payload - {' '} - rich text editor. + and using the Rich Text Editor does not involve learning how to develop for a{' '}Payload{' '}rich text editor. Instead, you can invest your time and effort into learning the underlying open-source tools that diff --git a/docs/fields/upload.mdx b/docs/fields/upload.mdx index d7db7ca27da..055509723c5 100644 --- a/docs/fields/upload.mdx +++ b/docs/fields/upload.mdx @@ -46,7 +46,7 @@ export const MyUploadField: Field = { | Option | Description | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **`name`** \* | To be used as the property name when stored and retrieved from the database. [More](/docs/fields/overview#field-names) | -| **`*relationTo`** \* | Provide a single collection `slug` to allow this field to accept a relation to. Note: the related collection must be configured to support Uploads. | +| **`relationTo`** \* | Provide a single collection `slug` to allow this field to accept a relation to. Note: the related collection must be configured to support Uploads. | | **`filterOptions`** | A query to filter which options appear in the UI and validate against. [More](#filtering-upload-options). | | **`maxDepth`** | Sets a number limit on iterations of related documents to populate when queried. [Depth](../queries/depth) | | **`label`** | Text used as a field label in the Admin Panel or an object with keys for each language. | diff --git a/docs/hooks/context.mdx b/docs/hooks/context.mdx index 1b0006d8f0c..7004c92b178 100644 --- a/docs/hooks/context.mdx +++ b/docs/hooks/context.mdx @@ -139,4 +139,4 @@ declare module 'payload' { } ``` -This will add a the property `myObject` with a type of string to every context object. Make sure to follow this example correctly, as type augmentation can mess up your types if you do it wrong. +This will add the property `myObject` with a type of string to every context object. Make sure to follow this example correctly, as type augmentation can mess up your types if you do it wrong. diff --git a/docs/lexical/migration.mdx b/docs/lexical/migration.mdx index 8e0b5841c86..dbb8dbe966e 100644 --- a/docs/lexical/migration.mdx +++ b/docs/lexical/migration.mdx @@ -52,7 +52,7 @@ const Pages: CollectionConfig = { } ``` -and done! Now, everytime this lexical editor is initialized, it converts the slate date to lexical on-the-fly. If the data is already in lexical format, it will just pass it through. +and done! Now, every time this lexical editor is initialized, it converts the slate date to lexical on-the-fly. If the data is already in lexical format, it will just pass it through. This is by far the easiest way to migrate from Slate to Lexical, although it does come with a few caveats: diff --git a/docs/plugins/form-builder.mdx b/docs/plugins/form-builder.mdx index 381b5a1f411..6031ad61740 100644 --- a/docs/plugins/form-builder.mdx +++ b/docs/plugins/form-builder.mdx @@ -416,7 +416,7 @@ This plugin relies on the [email configuration](../email/overview) defined in yo ### Email formatting -The email contents supports rich text which will be serialised to HTML on the server before being sent. By default it reads the global configuration of your rich text editor. +The email contents supports rich text which will be serialized to HTML on the server before being sent. By default it reads the global configuration of your rich text editor. The email subject and body supports inserting dynamic fields from the form submission data using the `{{field_name}}` syntax. For example, if you have a field called `name` in your form, you can include this in the email body like so: diff --git a/docs/queries/select.mdx b/docs/queries/select.mdx index 3bd4fe694ae..08ce1f02403 100644 --- a/docs/queries/select.mdx +++ b/docs/queries/select.mdx @@ -92,6 +92,7 @@ const getPosts = async () => { const response = await fetch(`http://localhost:3000/api/posts${stringifiedQuery}`) // Continue to handle the response below... } +``` Reminder: diff --git a/docs/queries/sort.mdx b/docs/queries/sort.mdx index 60b46c3cd2b..293a4d23d39 100644 --- a/docs/queries/sort.mdx +++ b/docs/queries/sort.mdx @@ -6,7 +6,7 @@ desc: Payload sort allows you to order your documents by a field in ascending or keywords: query, documents, pagination, documentation, Content Management System, cms, headless, javascript, node, react, nextjs --- -Documents in Payload can be easily sorted by a specific [Field](../fields/overview). When querying Documents, you can pass the name of any top-level field, and the response will sort the Documents by that field in _ascending_ order. If prefixed with a minus symbol ("-"), they will be sorted in _descending_ order. In Local API multiple fields can be specificed by using an array of strings. In REST API multiple fields can be specified by separating fields with comma. The minus symbol can be in front of individual fields. +Documents in Payload can be easily sorted by a specific [Field](../fields/overview). When querying Documents, you can pass the name of any top-level field, and the response will sort the Documents by that field in _ascending_ order. If prefixed with a minus symbol ("-"), they will be sorted in _descending_ order. In Local API multiple fields can be specified by using an array of strings. In REST API multiple fields can be specified by separating fields with comma. The minus symbol can be in front of individual fields. Because sorting is handled by the database, the field cannot be a [Virtual Field](https://payloadcms.com/blog/learn-how-virtual-fields-can-help-solve-common-cms-challenges). It must be stored in the database to be searchable. diff --git a/docs/rest-api/overview.mdx b/docs/rest-api/overview.mdx index 2f3003f0e63..69f68a7fd7d 100644 --- a/docs/rest-api/overview.mdx +++ b/docs/rest-api/overview.mdx @@ -18,7 +18,7 @@ All Payload API routes are mounted and prefixed to your config's `routes.api` UR - [depth](../queries/depth) - automatically populates relationships and uploads - [locale](/docs/configuration/localization#retrieving-localized-docs) - retrieves document(s) in a specific locale - [fallback-locale](/docs/configuration/localization#retrieving-localized-docs) - specifies a fallback locale if no locale value exists -- [select](../queries/select) - speicifes which fields to include to the result +- [select](../queries/select) - specifies which fields to include to the result ## Collections diff --git a/docs/upload/overview.mdx b/docs/upload/overview.mdx index f4110266521..026203889ae 100644 --- a/docs/upload/overview.mdx +++ b/docs/upload/overview.mdx @@ -98,7 +98,7 @@ _An asterisk denotes that an option is required._ | **`displayPreview`** | Enable displaying preview of the uploaded file in Upload fields related to this Collection. Can be locally overridden by `displayPreview` option in Upload field. [More](/docs/fields/upload#config-options). | | **`externalFileHeaderFilter`** | Accepts existing headers and returns the headers after filtering or modifying. | | **`filesRequiredOnCreate`** | Mandate file data on creation, default is true. | -| **`filenameCompoundIndex`** | Field slugs to use for a compount index instead of the default filename index. +| **`filenameCompoundIndex`** | Field slugs to use for a compound index instead of the default filename index. | **`focalPoint`** | Set to `false` to disable the focal point selection tool in the [Admin Panel](../admin/overview). The focal point selector is only available when `imageSizes` or `resizeOptions` are defined. [More](#crop-and-focal-point-selector) | | **`formatOptions`** | An object with `format` and `options` that are used with the Sharp image library to format the upload file. [More](https://sharp.pixelplumbing.com/api-output#toformat) | | **`handlers`** | Array of Request handlers to execute when fetching a file, if a handler returns a Response it will be sent to the client. Otherwise Payload will retrieve and send back the file. | @@ -144,7 +144,7 @@ export default buildConfig({ If you specify an array of `imageSizes` to your `upload` config, Payload will automatically crop and resize your uploads to fit each of the sizes specified by your config. -The [Admin Panel](../admin/overview) will also automatically display all available files, including width, height, and filesize, for each of your uploaded files. +The [Admin Panel](../admin/overview) will also automatically display all available files, including width, height, and file size, for each of your uploaded files. Behind the scenes, Payload relies on [`sharp`](https://sharp.pixelplumbing.com/api-resize#resize) to perform its image resizing. You can specify additional options for `sharp` to use while resizing your images. diff --git a/docs/upload/storage-adapters.mdx b/docs/upload/storage-adapters.mdx index d02dfdd5b76..644922a22bc 100644 --- a/docs/upload/storage-adapters.mdx +++ b/docs/upload/storage-adapters.mdx @@ -310,7 +310,7 @@ This plugin is configurable to work across many different Payload collections. A | Option | Type | Description | | ---------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | `collections` \* | `Record` | Object with keys set to the slug of collections you want to enable the plugin for, and values set to collection-specific options. | -| `enabled` | | `boolean` to conditionally enable/disable plugin. Default: true. | +| `enabled` | `boolean` | To conditionally enable/disable plugin. Default: `true`. | ## Collection-specific options