Set page metadata
page.setMetadata(parameters)
Updates the metadata of a page, including SEO-related properties, OpenGraph settings, and search configurations. For more information on the information and properties, see all methods in the Managing Pages section of the API Reference.
Syntax
Parameters
- metadata: PageMetadata - An object containing the page metadata properties:
- name: string - The name of the page
- slug: string - The URL-friendly identifier for the page
- title: string - The page title
- description: string - The page description
- isDraft: boolean - Whether the page is in draft status
- usesTitleAsOpenGraphTitle: boolean - Whether to use the page title as the OpenGraph title
- openGraphTitle: string - Custom OpenGraph title
- usesDescriptionAsOpenGraphDescription: boolean - Whether to use the page description as the OpenGraph description
- openGraphDescription: string - Custom OpenGraph description
- openGraphImage: string - URL of the OpenGraph image
- isExcludedFromSearch: boolean - Whether to exclude the page from search results
- usesTitleAsSearchTitle: boolean - Whether to use the page title as the search title
- searchTitle: string - Custom search title
- usesDescriptionAsSearchDescription: boolean - Whether to use the page description as the search description
- searchDescription: string - Custom search description
- usesOpenGraphImageAsSearchImage: boolean - Whether to use the OpenGraph image as the search image
- searchImage: string - Custom search image URL
Returns
Promise<null
>
A promise that resolves to null
.