For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
      • Page information
        • Get page name
        • Set page name
        • Get page title
        • Set page title
        • Get page slug
        • Set page slug
        • Get page description
        • Set page description
        • Get publish path
        • Get page category
        • Get utility page key
        • Get collection ID
        • Get collection name
      • Page settings
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • page.setMetadata(parameters)
  • Syntax
  • Parameters
  • Returns
  • Example
  • Designer Ability
Pages & FoldersManaging Pages

Set page metadata

Was this page helpful?
Previous

Get page name

Next
Built with

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

1page.setMetadata(metadata: PageMetadata): void
2
3type PageMetadata = {
4 name: string;
5 slug: string;
6 title: string;
7 description: string;
8 isDraft: boolean;
9 usesTitleAsOpenGraphTitle: boolean;
10 openGraphTitle: string;
11 usesDescriptionAsOpenGraphDescription: boolean;
12 openGraphDescription: string;
13 openGraphImage: string;
14 isExcludedFromSearch: boolean;
15 usesTitleAsSearchTitle: boolean;
16 searchTitle: string;
17 usesDescriptionAsSearchDescription: boolean;
18 searchDescription: string;
19 usesOpenGraphImageAsSearchImage: boolean;
20 searchImage: string;
21}

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.

Example

1// Update page metadata
2page.setMetadata({
3 name: "Product Features",
4 slug: "product-features",
5 title: "Awesome Product Features",
6 description: "Discover our product's amazing features",
7 isDraft: false,
8 usesTitleAsOpenGraphTitle: true,
9 openGraphTitle: "",
10 usesDescriptionAsOpenGraphDescription: true,
11 openGraphDescription: "",
12 openGraphImage: "https://example.com/og-image.jpg",
13 isExcludedFromSearch: false,
14 usesTitleAsSearchTitle: true,
15 searchTitle: "",
16 usesDescriptionAsSearchDescription: true,
17 searchDescription: "",
18 usesOpenGraphImageAsSearchImage: true,
19 searchImage: ""
20});

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny