Site Initializer does not apply SEO settings for Display Page Templates

What is the problem you are trying to solve?

When using a Site Initializer to provision a site, there is no way to seed SEO settings (HTML title template, meta description, .etc) for Display Page Templates through the file-based approach.

What is your project about? (e. g. Intranet, Partner Portal, Enterprise Website, etc)

Enterprise public-facing website built on Liferay DXP, using Site Initializers to manage full site provisioning. Display Page Templates are used extensively to render structured content (web content articles, custom objects), and SEO configuration on those templates is critical for search engine visibility.

What is your proposed solution? (optional)

The display-page-template.json file should support a displayPageTemplateSettings block, so SEO settings can be declared alongside the template definition:

{
  "contentType": { "className": "com.liferay.journal.model.JournalArticle" },
  "name": "News Details",
  "displayPageTemplateSettings": {
    "seoSettings": {
      "htmlTitleTemplate": "${title.getData()}",
      "descriptionTemplate": "${description.getData()}",
      "robots_i18n": { "en_US": "index, follow" },
      "sitemapSettings": {
        "include": true,
        "changeFrequency": "weekly",
        "pagePriority": 0.5
      }
    },
    "openGraphSettings": {
      "titleTemplate": "${title.getData()}",
      "descriptionTemplate": "${description.getData()}"
    }
  }
}

On the implementation side, DisplayPagesImporterCallable in LayoutsImporterImpl would need to read displayPageTemplateSettings after creating the template entry and apply it via `LayoutSEOEntryLocalService. The data model already exists in headless-admin-site (DisplayPageTemplateSEOSettings, DisplayPageTemplateOpenGraphSettings`). It just needs to be wired into the import pipeline.

3 Likes