mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-10 01:32:48 +08:00
break down with docs
This commit is contained in:
parent
6a3640d0ed
commit
f6978be849
@ -41,147 +41,15 @@ Create any files and directories that don't already exist, using these paths:
|
|||||||
The DigitalExperience directory contains only `_meta.json` and `content.json`. Do not create any directories other than `sfdc_cms__site` inside the bundle.
|
The DigitalExperience directory contains only `_meta.json` and `content.json`. Do not create any directories other than `sfdc_cms__site` inside the bundle.
|
||||||
|
|
||||||
### Step 3: Populate All Metadata Fields
|
### Step 3: Populate All Metadata Fields
|
||||||
Use the templates below. Values in `{braces}` are resolved property references — substitute them with the actual values from Step 1.
|
Use the default templates in the docs below. Values in `{braces}` are resolved property references — substitute them with the actual values from Step 1.
|
||||||
|
|
||||||
#### Network
|
| Metadata Type | Template Reference |
|
||||||
```xml
|
|--------------|-------------------|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
| Network | [configure-metadata-network.md](docs/configure-metadata-network.md) |
|
||||||
<Network xmlns="http://soap.sforce.com/2006/04/metadata">
|
| CustomSite | [configure-metadata-custom-site.md](docs/configure-metadata-custom-site.md) |
|
||||||
<allowInternalUserLogin>false</allowInternalUserLogin>
|
| DigitalExperienceConfig | [configure-metadata-digital-experience-config.md](docs/configure-metadata-digital-experience-config.md) |
|
||||||
<allowMembersToFlag>false</allowMembersToFlag>
|
| DigitalExperienceBundle | [configure-metadata-digital-experience-bundle.md](docs/configure-metadata-digital-experience-bundle.md) |
|
||||||
<changePasswordTemplate>unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
|
| DigitalExperience (sfdc_cms__site) | [configure-metadata-digital-experience.md](docs/configure-metadata-digital-experience.md) |
|
||||||
<disableReputationRecordConversations>true</disableReputationRecordConversations>
|
|
||||||
<emailSenderAddress>admin@company.com</emailSenderAddress>
|
|
||||||
<emailSenderName>{siteName}</emailSenderName>
|
|
||||||
<embeddedLoginEnabled>false</embeddedLoginEnabled>
|
|
||||||
<enableApexCDNCaching>true</enableApexCDNCaching>
|
|
||||||
<enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
|
|
||||||
<enableDirectMessages>true</enableDirectMessages>
|
|
||||||
<enableExpFriendlyUrlsAsDefault>false</enableExpFriendlyUrlsAsDefault>
|
|
||||||
<enableExperienceBundleBasedSnaOverrideEnabled>true</enableExperienceBundleBasedSnaOverrideEnabled>
|
|
||||||
<enableGuestChatter>{enableGuestAccess}</enableGuestChatter>
|
|
||||||
<enableGuestFileAccess>false</enableGuestFileAccess>
|
|
||||||
<enableGuestMemberVisibility>false</enableGuestMemberVisibility>
|
|
||||||
<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
|
|
||||||
<enableInvitation>false</enableInvitation>
|
|
||||||
<enableKnowledgeable>false</enableKnowledgeable>
|
|
||||||
<enableLWRExperienceConnectedApp>false</enableLWRExperienceConnectedApp>
|
|
||||||
<enableMemberVisibility>false</enableMemberVisibility>
|
|
||||||
<enableNicknameDisplay>true</enableNicknameDisplay>
|
|
||||||
<enablePrivateMessages>false</enablePrivateMessages>
|
|
||||||
<enableReputation>false</enableReputation>
|
|
||||||
<enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
|
|
||||||
<enableSiteAsContainer>true</enableSiteAsContainer>
|
|
||||||
<enableTalkingAboutStats>true</enableTalkingAboutStats>
|
|
||||||
<enableTopicAssignmentRules>true</enableTopicAssignmentRules>
|
|
||||||
<enableTopicSuggestions>false</enableTopicSuggestions>
|
|
||||||
<enableUpDownVote>false</enableUpDownVote>
|
|
||||||
<forgotPasswordTemplate>unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
|
|
||||||
<gatherCustomerSentimentData>false</gatherCustomerSentimentData>
|
|
||||||
<headlessForgotPasswordTemplate>unfiled$public/CommunityHeadlessForgotPasswordTemplate</headlessForgotPasswordTemplate>
|
|
||||||
<headlessRegistrationTemplate>unfiled$public/CommunityHeadlessRegistrationTemplate</headlessRegistrationTemplate>
|
|
||||||
<networkMemberGroups>
|
|
||||||
<profile>admin</profile>
|
|
||||||
</networkMemberGroups>
|
|
||||||
<networkPageOverrides>
|
|
||||||
<changePasswordPageOverrideSetting>Standard</changePasswordPageOverrideSetting>
|
|
||||||
<forgotPasswordPageOverrideSetting>Designer</forgotPasswordPageOverrideSetting>
|
|
||||||
<homePageOverrideSetting>Designer</homePageOverrideSetting>
|
|
||||||
<loginPageOverrideSetting>Designer</loginPageOverrideSetting>
|
|
||||||
<selfRegProfilePageOverrideSetting>Designer</selfRegProfilePageOverrideSetting>
|
|
||||||
</networkPageOverrides>
|
|
||||||
<newSenderAddress>admin@company.com</newSenderAddress>
|
|
||||||
<picassoSite>{siteName}1</picassoSite>
|
|
||||||
<selfRegistration>false</selfRegistration>
|
|
||||||
<sendWelcomeEmail>true</sendWelcomeEmail>
|
|
||||||
<site>{siteName}</site>
|
|
||||||
<siteArchiveStatus>NotArchived</siteArchiveStatus>
|
|
||||||
<status>Live</status>
|
|
||||||
<tabs>
|
|
||||||
<defaultTab>home</defaultTab>
|
|
||||||
<standardTab>Chatter</standardTab>
|
|
||||||
</tabs>
|
|
||||||
<urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
|
|
||||||
<welcomeTemplate>unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
|
|
||||||
</Network>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### CustomSite
|
|
||||||
```xml
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
||||||
<active>true</active>
|
|
||||||
<allowGuestPaymentsApi>false</allowGuestPaymentsApi>
|
|
||||||
<allowHomePage>false</allowHomePage>
|
|
||||||
<allowStandardAnswersPages>false</allowStandardAnswersPages>
|
|
||||||
<allowStandardIdeasPages>false</allowStandardIdeasPages>
|
|
||||||
<allowStandardLookups>false</allowStandardLookups>
|
|
||||||
<allowStandardPortalPages>true</allowStandardPortalPages>
|
|
||||||
<allowStandardSearch>false</allowStandardSearch>
|
|
||||||
<authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
|
|
||||||
<bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
|
|
||||||
<browserXssProtection>true</browserXssProtection>
|
|
||||||
<cachePublicVisualforcePagesInProxyServers>true</cachePublicVisualforcePagesInProxyServers>
|
|
||||||
<clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
|
|
||||||
<contentSniffingProtection>true</contentSniffingProtection>
|
|
||||||
<enableAuraRequests>true</enableAuraRequests>
|
|
||||||
<fileNotFoundPage>FileNotFound</fileNotFoundPage>
|
|
||||||
<genericErrorPage>Exception</genericErrorPage>
|
|
||||||
<inMaintenancePage>InMaintenance</inMaintenancePage>
|
|
||||||
<indexPage>CommunitiesLanding</indexPage>
|
|
||||||
<masterLabel>{siteName}</masterLabel>
|
|
||||||
<redirectToCustomDomain>false</redirectToCustomDomain>
|
|
||||||
<referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin>
|
|
||||||
<selfRegPage>CommunitiesSelfReg</selfRegPage>
|
|
||||||
<siteType>ChatterNetwork</siteType>
|
|
||||||
<urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
|
|
||||||
</CustomSite>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### DigitalExperienceConfig
|
|
||||||
```xml
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<DigitalExperienceConfig xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
||||||
<label>{siteName}</label>
|
|
||||||
<site>
|
|
||||||
<urlPathPrefix>{siteUrlPathPrefix}</urlPathPrefix>
|
|
||||||
</site>
|
|
||||||
<space>site/{siteName}1</space>
|
|
||||||
</DigitalExperienceConfig>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### DigitalExperienceBundle
|
|
||||||
```xml
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<DigitalExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
||||||
<label>{siteName}1</label>
|
|
||||||
</DigitalExperienceBundle>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### DigitalExperience — `_meta.json`
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"apiName": "{siteName}1",
|
|
||||||
"path": "",
|
|
||||||
"type": "sfdc_cms__site"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### DigitalExperience — `content.json`
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"type": "sfdc_cms__site",
|
|
||||||
"title": "{siteName}",
|
|
||||||
"urlName": "{siteUrlPathPrefix}",
|
|
||||||
"contentBody": {
|
|
||||||
"authenticationType": "AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED",
|
|
||||||
"appContainer": true,
|
|
||||||
"appSpace": "{appNamespace}__{appDevName}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
The `appContainer: true` and `appSpace` fields are what make this a React site rather than a standard LWR site. The `appSpace` value follows the format `{namespace}__{developerName}` and must match a deployed `WebApplication` metadata record.
|
|
||||||
|
|
||||||
### Step 4: Resolve Additional Configurations
|
### Step 4: Resolve Additional Configurations
|
||||||
Address any extra configurations the user requests. Use the schemas returned by `get_metadata_api_context` in Step 2 to understand each field's purpose, and update only the minimum necessary fields.
|
Address any extra configurations the user requests. Use the schemas returned by `get_metadata_api_context` in Step 2 to understand each field's purpose, and update only the minimum necessary fields.
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
# Configure Metadata: CustomSite
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
This configuration file creates a **net-new, default** CustomSite metadata record for a Digital Experience Site. It is not intended to edit or modify an existing CustomSite record. Use this template only when provisioning a brand-new site.
|
||||||
|
|
||||||
|
## File Location
|
||||||
|
```
|
||||||
|
sites/{siteName}.site-meta.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Default Template
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||||
|
<active>true</active>
|
||||||
|
<allowGuestPaymentsApi>false</allowGuestPaymentsApi>
|
||||||
|
<allowHomePage>false</allowHomePage>
|
||||||
|
<allowStandardAnswersPages>false</allowStandardAnswersPages>
|
||||||
|
<allowStandardIdeasPages>false</allowStandardIdeasPages>
|
||||||
|
<allowStandardLookups>false</allowStandardLookups>
|
||||||
|
<allowStandardPortalPages>true</allowStandardPortalPages>
|
||||||
|
<allowStandardSearch>false</allowStandardSearch>
|
||||||
|
<authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
|
||||||
|
<bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
|
||||||
|
<browserXssProtection>true</browserXssProtection>
|
||||||
|
<cachePublicVisualforcePagesInProxyServers>true</cachePublicVisualforcePagesInProxyServers>
|
||||||
|
<clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
|
||||||
|
<contentSniffingProtection>true</contentSniffingProtection>
|
||||||
|
<enableAuraRequests>true</enableAuraRequests>
|
||||||
|
<fileNotFoundPage>FileNotFound</fileNotFoundPage>
|
||||||
|
<genericErrorPage>Exception</genericErrorPage>
|
||||||
|
<inMaintenancePage>InMaintenance</inMaintenancePage>
|
||||||
|
<indexPage>CommunitiesLanding</indexPage>
|
||||||
|
<masterLabel>{siteName}</masterLabel>
|
||||||
|
<redirectToCustomDomain>false</redirectToCustomDomain>
|
||||||
|
<referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin>
|
||||||
|
<selfRegPage>CommunitiesSelfReg</selfRegPage>
|
||||||
|
<siteType>ChatterNetwork</siteType>
|
||||||
|
<urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
|
||||||
|
</CustomSite>
|
||||||
|
```
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
# Configure Metadata: DigitalExperienceBundle
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
This configuration file creates a **net-new, default** DigitalExperienceBundle metadata record for a Digital Experience Site. It is not intended to edit or modify an existing DigitalExperienceBundle record. Use this template only when provisioning a brand-new site.
|
||||||
|
|
||||||
|
## File Location
|
||||||
|
```
|
||||||
|
digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Default Template
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<DigitalExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||||
|
<label>{siteName}1</label>
|
||||||
|
</DigitalExperienceBundle>
|
||||||
|
```
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
# Configure Metadata: DigitalExperienceConfig
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
This configuration file creates a **net-new, default** DigitalExperienceConfig metadata record for a Digital Experience Site. It is not intended to edit or modify an existing DigitalExperienceConfig record. Use this template only when provisioning a brand-new site.
|
||||||
|
|
||||||
|
## File Location
|
||||||
|
```
|
||||||
|
digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Default Template
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<DigitalExperienceConfig xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||||
|
<label>{siteName}</label>
|
||||||
|
<site>
|
||||||
|
<urlPathPrefix>{siteUrlPathPrefix}</urlPathPrefix>
|
||||||
|
</site>
|
||||||
|
<space>site/{siteName}1</space>
|
||||||
|
</DigitalExperienceConfig>
|
||||||
|
```
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
# Configure Metadata: DigitalExperience (sfdc_cms__site)
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
These configuration files create **net-new, default** DigitalExperience content records (`sfdc_cms__site` type) for a Digital Experience Site. They are not intended to edit or modify existing DigitalExperience content. Use these templates only when provisioning a brand-new site.
|
||||||
|
|
||||||
|
The `appContainer: true` and `appSpace` fields in `content.json` are what make this a React site rather than a standard LWR site. The `appSpace` value follows the format `{namespace}__{developerName}` and must match a deployed `WebApplication` metadata record.
|
||||||
|
|
||||||
|
## File Location
|
||||||
|
The DigitalExperience directory contains only `_meta.json` and `content.json`. Do not create any directories other than `sfdc_cms__site` inside the bundle.
|
||||||
|
|
||||||
|
```
|
||||||
|
digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/_meta.json
|
||||||
|
digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/content.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## Default Templates
|
||||||
|
### `_meta.json`
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"apiName": "{siteName}1",
|
||||||
|
"path": "",
|
||||||
|
"type": "sfdc_cms__site"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `content.json`
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "sfdc_cms__site",
|
||||||
|
"title": "{siteName}",
|
||||||
|
"urlName": "{siteUrlPathPrefix}",
|
||||||
|
"contentBody": {
|
||||||
|
"authenticationType": "AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED",
|
||||||
|
"appContainer": true,
|
||||||
|
"appSpace": "{appNamespace}__{appDevName}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
# Configure Metadata: Network
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
This configuration file creates a **net-new, default** Network metadata record for a Digital Experience Site. It is not intended to edit or modify an existing Network record. Use this template only when provisioning a brand-new site.
|
||||||
|
|
||||||
|
## File Location
|
||||||
|
```
|
||||||
|
networks/{siteName}.network-meta.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Default Template
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Network xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||||
|
<allowInternalUserLogin>false</allowInternalUserLogin>
|
||||||
|
<allowMembersToFlag>false</allowMembersToFlag>
|
||||||
|
<changePasswordTemplate>unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
|
||||||
|
<disableReputationRecordConversations>true</disableReputationRecordConversations>
|
||||||
|
<emailSenderAddress>admin@company.com</emailSenderAddress>
|
||||||
|
<emailSenderName>{siteName}</emailSenderName>
|
||||||
|
<embeddedLoginEnabled>false</embeddedLoginEnabled>
|
||||||
|
<enableApexCDNCaching>true</enableApexCDNCaching>
|
||||||
|
<enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
|
||||||
|
<enableDirectMessages>true</enableDirectMessages>
|
||||||
|
<enableExpFriendlyUrlsAsDefault>false</enableExpFriendlyUrlsAsDefault>
|
||||||
|
<enableExperienceBundleBasedSnaOverrideEnabled>true</enableExperienceBundleBasedSnaOverrideEnabled>
|
||||||
|
<enableGuestChatter>{enableGuestAccess}</enableGuestChatter>
|
||||||
|
<enableGuestFileAccess>false</enableGuestFileAccess>
|
||||||
|
<enableGuestMemberVisibility>false</enableGuestMemberVisibility>
|
||||||
|
<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
|
||||||
|
<enableInvitation>false</enableInvitation>
|
||||||
|
<enableKnowledgeable>false</enableKnowledgeable>
|
||||||
|
<enableLWRExperienceConnectedApp>false</enableLWRExperienceConnectedApp>
|
||||||
|
<enableMemberVisibility>false</enableMemberVisibility>
|
||||||
|
<enableNicknameDisplay>true</enableNicknameDisplay>
|
||||||
|
<enablePrivateMessages>false</enablePrivateMessages>
|
||||||
|
<enableReputation>false</enableReputation>
|
||||||
|
<enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
|
||||||
|
<enableSiteAsContainer>true</enableSiteAsContainer>
|
||||||
|
<enableTalkingAboutStats>true</enableTalkingAboutStats>
|
||||||
|
<enableTopicAssignmentRules>true</enableTopicAssignmentRules>
|
||||||
|
<enableTopicSuggestions>false</enableTopicSuggestions>
|
||||||
|
<enableUpDownVote>false</enableUpDownVote>
|
||||||
|
<forgotPasswordTemplate>unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
|
||||||
|
<gatherCustomerSentimentData>false</gatherCustomerSentimentData>
|
||||||
|
<headlessForgotPasswordTemplate>unfiled$public/CommunityHeadlessForgotPasswordTemplate</headlessForgotPasswordTemplate>
|
||||||
|
<headlessRegistrationTemplate>unfiled$public/CommunityHeadlessRegistrationTemplate</headlessRegistrationTemplate>
|
||||||
|
<networkMemberGroups>
|
||||||
|
<profile>admin</profile>
|
||||||
|
</networkMemberGroups>
|
||||||
|
<networkPageOverrides>
|
||||||
|
<changePasswordPageOverrideSetting>Standard</changePasswordPageOverrideSetting>
|
||||||
|
<forgotPasswordPageOverrideSetting>Designer</forgotPasswordPageOverrideSetting>
|
||||||
|
<homePageOverrideSetting>Designer</homePageOverrideSetting>
|
||||||
|
<loginPageOverrideSetting>Designer</loginPageOverrideSetting>
|
||||||
|
<selfRegProfilePageOverrideSetting>Designer</selfRegProfilePageOverrideSetting>
|
||||||
|
</networkPageOverrides>
|
||||||
|
<newSenderAddress>admin@company.com</newSenderAddress>
|
||||||
|
<picassoSite>{siteName}1</picassoSite>
|
||||||
|
<selfRegistration>false</selfRegistration>
|
||||||
|
<sendWelcomeEmail>true</sendWelcomeEmail>
|
||||||
|
<site>{siteName}</site>
|
||||||
|
<siteArchiveStatus>NotArchived</siteArchiveStatus>
|
||||||
|
<status>Live</status>
|
||||||
|
<tabs>
|
||||||
|
<defaultTab>home</defaultTab>
|
||||||
|
<standardTab>Chatter</standardTab>
|
||||||
|
</tabs>
|
||||||
|
<urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix>
|
||||||
|
<welcomeTemplate>unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
|
||||||
|
</Network>
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue
Block a user