Skip to content

Instantly share code, notes, and snippets.

@GuitarRich
Created March 14, 2023 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuitarRich/a3e08aacf0a24bcbedaf61fab247b9ac to your computer and use it in GitHub Desktop.
Save GuitarRich/a3e08aacf0a24bcbedaf61fab247b9ac to your computer and use it in GitHub Desktop.
Example Sitecore Content Serialization module for Headless SXA.
{
"$schema": "../../.sitecore/schemas/ModuleFile.schema.json",
"tags": [ "platform" ],
"namespace": "Project.HeadlessSXAExample",
"items": {
"includes": [
{
"name": "ProjectTemplates",
"path": "/sitecore/templates/Project/<TENENT_NAME>",
"allowedPushOperations": "CreateUpdateAndDelete"
},
{
"name": "ProjectMediaFolders",
"path": "/sitecore/Media Library/Project/<TENENT_NAME>",
"rules": [
{
"path": "shared",
"scope": "SingleItem",
"allowedPushOperations": "CreateOnly"
},
{
"path": "<site_name>",
"scope": "SingleItem",
"allowedPushOperations": "CreateOnly"
}
]
},
{
"name": "ProjectRednderings",
"path": "/sitecore/Layout/Renderings/Project/<TENENT_NAME>",
"allowedPushOperations": "CreateUpdateAndDelete"
},
{
"name": "ProjectPlaceholderSettings",
"path": "/sitecore/Layout/Placeholder Settings/Project/<TENENT_NAME>",
"allowedPushOperations": "CreateUpdateAndDelete"
},
{
"name": "TenantRoot",
"path": "/sitecore/content/<TENENT_NAME>",
"scope": "SingleItem",
"allowedPushOperations": "CreateAndUpdate"
},
{
"name": "Site",
"path": "/sitecore/content/<TENENT_NAME>/<SITE_NAME>",
"rules": [
{
"path": "home",
"scope": "SingleItem",
"allowedPushOperations": "CreateOnly"
},
{
"path": "Media",
"scope": "SingleItem",
"allowedPushOperations": "CreateAndUpdate"
},
{
"path": "Data",
"scope": "ItemAndChildren",
"allowedPushOperations": "CreateAndUpdate"
},
{
"path": "Dictionary",
"scope": "ItemAndChildren",
"allowedPushOperations": "CreateOnly"
},
{
"path": "Presentation",
"scope": "ItemAndDescendants",
"allowedPushOperations": "CreateAndUpdate"
},
{
"path": "Settings",
"scope": "ItemAndChildren",
"allowedPushOperations": "CreateAndUpdate"
},
{
"path": "Settings/Site Grouping",
"scope": "ItemAndDescendants",
"allowedPushOperations": "CreateOnly"
},
{
"path": "*",
"scope": "Ignored"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment