Configure SEO metadata generation

Automatically generates SEO and OG metadata, including page title, description, and keywords, based on the page content for search engine optimization and social media sharing.

Supports multilingual sites.

Activation

Activate the feature
  1. Go to the <light-module-folder>/<light-module-name>/dialogs/pages/<dialog>.yaml file in your project.

  2. Ensure that you have the following in the file:

    <light-module-folder>/<light-module-name>/dialogs/pages/<dialog>.yaml
    form:
      implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener (1)
      properties:
        #....
        seoGenerator: (2)
          $type: aiSeoMetadataGenerator
          label: AI Seo Metadata
          parameters:
            titleField: title # value is the property name of the field in the dialog
            metaDescriptionField: metaDescription
            ogDescriptionField: ogDescription
            metaKeywordsField: metaKeywords
            # ogTitleField: ogTitle
            # ogDescriptionField: ogDescription
            metaDataFields: # note all fields here need to have a corresponding parameter
              title: Title
              metaDescription: Description
              # ogTitle: ogTitle
              # ogDescription: ogDescription
              metaKeywords: Meta keywords
            excludedProperties: # Name of a property that should not be taken into account for metadata creation
              noIndexPage: noIndexPage
              navigation: navigation
              hideHero: hideHero
              seoGenerator: seoGenerator
              footer: footer
        #...
    1 Ensure you’re using the info.magnolia.ui.javascript.form.FormViewWithChangeListener implementation class.
    2 The SEO generator.

Configure content depth

Define the depth of content scanned for metadata

By default, the SEO generator scans only two levels of content beneath the page. This can result in incomplete metadata when key content is nested deeper, such as in layouts with multiple areas or rows.

To include deeper content levels, decorate the pages-minimum.yaml file in your light module:

<your-light-module>/decorations/ai-accelerator-ui/restEndpoints/delivery/pages-minimum.yaml
depth: 5  # set to the number of levels you need (1)
1 Set the depth according to the maximum nesting in your page layouts to ensure all SEO-relevant content is included. Default is 2.
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the AI Accelerator module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules