|
|
|
@@ -53,7 +53,6 @@ The following options are available for Root Metadata:
|
|
|
|
| Key | Type | Description |
|
|
|
|
| Key | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| `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. |
|
|
|
|
| `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. |
|
|
|
|
| `icons` | `IconConfig[]` | An array of icon objects. [More details](#icons). |
|
|
|
|
|
|
|
|
| `titleSuffix` | `string` | A suffix to append to the end of the title of every page. Defaults to "- Payload". |
|
|
|
|
| `titleSuffix` | `string` | A suffix to append to the end of the title of every page. Defaults to "- Payload". |
|
|
|
|
| `[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). |
|
|
|
|
| `[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). |
|
|
|
|
|
|
|
|
|
|
|
|
@@ -68,7 +67,7 @@ The Icons Config corresponds to the `<link>` tags that are used to specify icons
|
|
|
|
|
|
|
|
|
|
|
|
The most common icon type is the favicon, which is displayed in the browser tab. This is specified by the `rel` attribute `icon`. Other common icon types include `apple-touch-icon`, which is used by Apple devices when the Admin Panel is saved to the home screen, and `mask-icon`, which is used by Safari to mask the Admin Panel icon.
|
|
|
|
The most common icon type is the favicon, which is displayed in the browser tab. This is specified by the `rel` attribute `icon`. Other common icon types include `apple-touch-icon`, which is used by Apple devices when the Admin Panel is saved to the home screen, and `mask-icon`, which is used by Safari to mask the Admin Panel icon.
|
|
|
|
|
|
|
|
|
|
|
|
To customize icons, use the `icons` key within the `admin.meta` object in your Payload Config:
|
|
|
|
To customize icons, use the `admin.meta.icons` property in your Payload Config:
|
|
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
```ts
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -100,7 +99,7 @@ For a full list of all available Icon options, see the [Next.js documentation](h
|
|
|
|
|
|
|
|
|
|
|
|
Open Graph metadata is a set of tags that are used to control how URLs are displayed when shared on social media platforms. Open Graph metadata is automatically generated by Payload, but can be customized at the Root level.
|
|
|
|
Open Graph metadata is a set of tags that are used to control how URLs are displayed when shared on social media platforms. Open Graph metadata is automatically generated by Payload, but can be customized at the Root level.
|
|
|
|
|
|
|
|
|
|
|
|
To customize Open Graph metadata, use the `openGraph` key within the `admin.meta` object in your Payload Config:
|
|
|
|
To customize Open Graph metadata, use the `admin.meta.openGraph` property in your Payload Config:
|
|
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
```ts
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -128,6 +127,45 @@ To customize Open Graph metadata, use the `openGraph` key within the `admin.meta
|
|
|
|
|
|
|
|
|
|
|
|
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).
|
|
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Robots
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Setting the `robots` property will allow you to control the `robots` meta tag that is rendered within the `<head>` of the Admin Panel. This can be used to control how search engines index pages and displays them in search results.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By default, the Admin Panel is set to prevent search engines from indexing pages within the Admin Panel.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To customize the Robots Config, use the `admin.meta.robots` property in your Payload Config:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// ...
|
|
|
|
|
|
|
|
admin: {
|
|
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
|
|
// highlight-start
|
|
|
|
|
|
|
|
robots: 'noindex, nofollow',
|
|
|
|
|
|
|
|
// highlight-end
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For a full list of all available Robots options, see the [Next.js documentation](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#robots).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### Prevent Crawling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
While setting meta tags via `admin.meta.robots` can prevent search engines from _indexing_ web pages, it does not prevent them from being _crawled_.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To prevent your pages from being crawled altogether, add a `robots.txt` file to your root directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```txt
|
|
|
|
|
|
|
|
User-agent: *
|
|
|
|
|
|
|
|
Disallow: /admin/
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Banner type="info">
|
|
|
|
|
|
|
|
**Note:**
|
|
|
|
|
|
|
|
If you've customized the path to your Admin Panel via `config.routes`, be sure to update the `Disallow` directive to match your custom path.
|
|
|
|
|
|
|
|
</Banner>
|
|
|
|
|
|
|
|
|
|
|
|
## Collection Metadata
|
|
|
|
## Collection Metadata
|
|
|
|
|
|
|
|
|
|
|
|
Collection Metadata is the metadata that is applied to all pages within any given Collection within the Admin Panel. This metadata is used to customize the title and description of all views within any given Collection, unless overridden by the view itself.
|
|
|
|
Collection Metadata is the metadata that is applied to all pages within any given Collection within the Admin Panel. This metadata is used to customize the title and description of all views within any given Collection, unless overridden by the view itself.
|
|
|
|
|