You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every page within the Admin Panel automatically receives dynamic, auto-generated metadata derived from live document data, the user's current locale, and more, without any additional configuration. This includes the page title, description, og:image and everything in between. Metadata is fully configurable at the root level and cascades down to individual collections, documents, and custom views, allowing for the ability to control metadata on any page with high precision.
9
+
Every page within the Admin Panel automatically receives dynamic, auto-generated metadata derived from live document data, the user's current locale, and more. This includes the page title, description, og:image, etc. and requires no additional configuration.
10
+
11
+
Metadata is fully configurable at the root level and cascades down to individual collections, documents, and custom views. This allows for the ability to control metadata on any page with high precision, while also providing sensible defaults.
12
+
13
+
All metadata is injected into Next.js' [`generateMetadata`](https://nextjs.org/docs/app/api-reference/functions/generate-metadata) function. This used to generate the `<head>` of pages within the Admin Panel. All metadata options that are available in Next.js are exposed by Payload.
10
14
11
15
Within the Admin Panel, metadata can be customized at the following levels:
12
16
@@ -48,13 +52,10 @@ The following options are available for Root Metadata:
48
52
49
53
| Key | Type | Description |
50
54
| --- | --- | --- |
51
-
|**`title`**|`string`| The title of the Admin Panel. |
52
-
|**`description`**|`string`| The description of the Admin Panel. |
53
-
|**`defaultOGImageType`**|`dynamic` (default), `static`, or `off`| The type of default OG image to use. If set to `dynamic`, Payload will use Next.js image generation to create an image with the title of the page. If set to `static`, Payload will use the `defaultOGImage` URL. If set to `off`, Payload will not generate an OG image. |
54
-
|**`icons`**|`IconConfig[]`| An array of icon objects. [More details](#icons)|
55
-
|**`keywords`**|`string`| A comma-separated list of keywords to include in the metadata of the Admin Panel. |
56
-
|**`openGraph`**|`OpenGraphConfig`| An object containing Open Graph metadata. [More details](#open-graph)|
57
-
|**`titleSuffix`**|`string`| A suffix to append to the end of the title of every page. Defaults to "- Payload". |
55
+
|`defaultOGImageType`|`dynamic` (default), `static`, or `off`| The type of default OG image to use. If set to `dynamic`, Payload will use Next.js image generation to create an image with the title of the page. If set to `static`, Payload will use the `defaultOGImage` URL. If set to `off`, Payload will not generate an OG image. |
56
+
|`icons`|`IconConfig[]`| An array of icon objects. [More details](#icons). |
57
+
|`titleSuffix`|`string`| A suffix to append to the end of the title of every page. Defaults to "- Payload". |
58
+
|`[keyof Metadata]`|`unknown`| Any other properties that Next.js supports within the `generateMetadata` function. [More details](https://nextjs.org/docs/app/api-reference/functions/generate-metadata). |
58
59
59
60
<Bannertype="success">
60
61
**Reminder:**
@@ -93,17 +94,7 @@ To customize icons, use the `icons` key within the `admin.meta` object in your P
93
94
}
94
95
```
95
96
96
-
The following options are available for Icons:
97
-
98
-
| Key | Type | Description |
99
-
| --- | --- | --- |
100
-
|**`rel`**|`string`| The HTML `rel` attribute of the icon. |
101
-
|**`type`**|`string`| The MIME type of the icon. |
102
-
|**`color`**|`string`| The color of the icon. |
103
-
|**`fetchPriority`**|`string`| The [fetch priority](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchPriority) of the icon. |
104
-
|**`media`**|`string`| The [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries) of the icon. |
105
-
|**`sizes`**|`string`| The [sizes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes) of the icon. |
106
-
|**`url`**|`string`| The URL pointing the resource of the icon. |
97
+
For a full list of all available Icon options, see the [Next.js documentation](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#icons).
107
98
108
99
### Open Graph
109
100
@@ -135,14 +126,7 @@ To customize Open Graph metadata, use the `openGraph` key within the `admin.meta
135
126
}
136
127
```
137
128
138
-
The following options are available for Open Graph Metadata:
139
-
140
-
| Key | Type | Description |
141
-
| --- | --- | --- |
142
-
|**`description`**|`string`| The description of the Admin Panel. |
143
-
|**`images`**|`OGImageConfig` or `OGImageConfig[]`| An array of image objects. |
144
-
|**`siteName`**|`string`| The name of the site. |
145
-
|**`title`**|`string`| The title of the Admin Panel. |
129
+
For a full list of all available Open Graph options, see the [Next.js documentation](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#opengraph).
Copy file name to clipboardExpand all lines: docs/configuration/collections.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,7 @@ The following options are available:
121
121
|`useAsTitle`| Specify a top-level field to use for a document title throughout the Admin Panel. If no field is defined, the ID of the document is used as the title. A field with `virtual: true` cannot be used as the title. |
122
122
|`description`| Text to display below the Collection label in the List View to give editors more information. Alternatively, you can use the `admin.components.Description` to render a React component. [More details](#custom-components). |
123
123
|`defaultColumns`| Array of field names that correspond to which columns to show by default in this Collection's List View. |
124
+
|`disableCopyToLocale`| Disables the "Copy to Locale" button while editing documents within this Collection. Only applicable when localization is enabled. |
124
125
|`hideAPIURL`| Hides the "API URL" meta field while editing documents within this Collection. |
125
126
|`enableRichTextLink`| The [Rich Text](../fields/rich-text) field features a `Link` element which allows for users to automatically reference related documents within their rich text. Set to `true` by default. |
126
127
|`enableRichTextRelationship`| The [Rich Text](../fields/rich-text) field features a `Relationship` element which allows for users to automatically reference related documents within their rich text. Set to `true` by default. |
Copy file name to clipboardExpand all lines: docs/database/migrations.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,10 @@ default, migrations will be named using a timestamp.
118
118
npm run payload migrate:create optional-name-here
119
119
```
120
120
121
+
Flags:
122
+
*`--skip-empty`: with Postgres, it skips the "no schema changes detected. Would you like to create a blank migration file?" prompt which can be useful for generating migration in CI.
123
+
*`--force-accept-warning`: accepts any command prompts, creates a blank migration even if there weren't any changes to the schema.
124
+
121
125
### Status
122
126
123
127
The `migrate:status` command will check the status of migrations and output a table of which migrations have been run,
Copy file name to clipboardExpand all lines: docs/fields/overview.mdx
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,14 +286,15 @@ export const MyField: Field = {
286
286
287
287
The following additional properties are provided in the `ctx` object:
288
288
289
-
| Property | Description |
289
+
| Property | Description |
290
290
| --- | --- |
291
-
|`data`| An object containing the full collection or global document currently being edited. |
292
-
|`siblingData`| An object containing document data that is scoped to only fields within the same parent of this field. |
293
-
|`operation`| Will be `create` or `update` depending on the UI action or API call. |
294
-
|`id`| The `id` of the current document being edited. `id` is `undefined` during the `create` operation. |
295
-
|`req`| The current HTTP request object. Contains `payload`, `user`, etc. |
296
-
|`event`| Either `onChange` or `submit` depending on the current action. Used as a performance opt-in. [More details](#async-field-validations). |
291
+
|`data`| An object containing the full collection or global document currently being edited. |
292
+
|`siblingData`| An object containing document data that is scoped to only fields within the same parent of this field. |
293
+
|`operation`| Will be `create` or `update` depending on the UI action or API call. |
294
+
|`path`| The full path to the field in the schema, represented as an array of string segments, including array indexes. I.e `['group', 'myArray', '1', 'textField']`. |
295
+
|`id`| The `id` of the current document being edited. `id` is `undefined` during the `create` operation. |
296
+
|`req`| The current HTTP request object. Contains `payload`, `user`, etc. |
297
+
|`event`| Either `onChange` or `submit` depending on the current action. Used as a performance opt-in. [More details](#async-field-validations). |
297
298
298
299
#### Reusing Default Field Validations
299
300
@@ -522,11 +523,11 @@ You can show and hide fields based on what other fields are doing by utilizing c
522
523
523
524
The `ctx` object:
524
525
525
-
| Property | Description |
526
+
| Property | Description |
526
527
| --- | --- |
527
-
|**`blockData`**| The nearest parent block's data. If the field is not inside a block, this will be `undefined`. |
528
-
|**`path`**| The full path to the field in the schema, including array indexes. Useful for dynamic lookups. |
529
-
|**`user`**| The currently authenticated user object. |
528
+
|**`blockData`**| The nearest parent block's data. If the field is not inside a block, this will be `undefined`. |
529
+
|**`path`**| The full path to the field in the schema, represented as an array of string segments, including array indexes. I.e `['group', 'myArray', '1', 'textField']`. |
530
+
|**`user`**| The currently authenticated user object. |
530
531
531
532
The `condition` function should return a boolean that will control if the field should be displayed or not.
0 commit comments