cx-composer--for=liferay

Site Initializer

Bundle a whole site (content, structure, roles) and provision on deploy.

type: siteInitializer·Batch & Provisioning·Liferay docs →

# description

Packages a complete Liferay site — pages, structures, roles, content, settings, style-book, sample data — into a single extension. Deploying creates the site fully populated, in seconds, without any manual clicks. Site Initializer is how Liferay ships the demo sites you see in Liferay Learn tutorials, and it's the same mechanism used for repeatable multi-tenant provisioning. Because everything is checked into source, staging and production get identical starter sites; a bad edit can be rolled back by re-deploying an earlier version. The `overwrite: true` flag lets you re-provision an existing site on redeploy — useful in dev, dangerous in prod.

Bulk data import and full site provisioning on deploy.

# when to use

  • You're shipping a starter site (marketing template, product-specific tenant).
  • You want repeatable, checked-in site provisioning across environments.

# how to use

  1. 01Assemble your site export under the extension folder (structures, layouts, roles, content).
  2. 02Ship a paired oAuthApplicationHeadlessServer.
  3. 03Set the site's name + external reference code and deploy.

# required fields

fieldtypedescription
siteNamerequiredstringSite name on deploy.
siteExternalReferenceCoderequiredstringExternal reference code of the site.
oAuthApplicationHeadlessServerrequiredstringRef code of the paired oAuthApplicationHeadlessServer.

# optional fields

fieldtypedescription
namestringDisplay name.
overwritebooleanOverwrite an existing site on redeploy.
builtInTemplateKeystringBuilt-in site template key.
builtInTemplateTypestringBuilt-in site template type.
membershipTypestringSite membership: open, restricted, or private.
parentSiteKeystringParent site key for hierarchical sites.
siteName_i18nmap(locale->string)Localized site name by locale.

# example

client-extension.yaml
starter-site:
    type: siteInitializer
    siteName: Starter
    siteExternalReferenceCode: STARTER_SITE
    oAuthApplicationHeadlessServer: my-oauth-headless
    overwrite: true

# related types

Usually shipped alongside Site Initializer:

# more in batch & provisioning