forcedotcom/sf-skills / skills/experience-lwr-site-generate
experience-lwr-site-generate
FlaggedCreates, modifies, or manages Salesforce Experience Cloud LWR sites via DigitalExperience metadata. Always trigger when the tasks involve LWR sites configurations, e.g. creating/modifying pages/routes/views/theme layouts/branding sets, previewing sites, or creating/modifying guest sharing rule (metadata type sharingGuestRules)/guest user access/sharing records to guest users, or when user provides a guest user ID (15 or 18 characters starting with 005). NEVER trigger for React or any other ui bundle framework. LWR sites ONLY.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.5 KB |
| references/bootstrap-template-byo-lwr.md | markdown | 9.8 KB |
| references/configure-content-brandingSet.md | markdown | 5.9 KB |
| references/configure-content-route.md | markdown | 8.0 KB |
| references/configure-content-themeLayout.md | markdown | 5.1 KB |
| references/configure-content-view.md | markdown | 8.9 KB |
| references/configure-guest-sharing-rules.md | markdown | 2.3 KB |
| references/handle-component-and-region-ids.md | markdown | 2.1 KB |
| references/handle-ui-components.md | markdown | 7.1 KB |
| references/update-site-urls.md | markdown | 3.5 KB |
references/update-site-urls.md
View on GitHub# Updating Experience Site URLs
Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs.
## Architecture Overview
Every Salesforce Experience Site consists of three components:
1. **Network** (metadata: `Network`) - Network configuration
2. **ChatterNetwork Site** (metadata: `CustomSite`) - Authentication endpoints and core site services
3. **ChatterNetworkPicasso Site** (metadata: `DigitalExperienceConfig` + `DigitalExperienceBundle`) - Customer-facing pages and content
## URL Pattern
These three components use **two different URLs**:
- **Primary URL** (ChatterNetworkPicasso): Used for customer-facing pages
- Defined in: `DigitalExperienceConfig` → `<urlPathPrefix>`
- Example: `mysite`
- **Secondary URL** (Network + CustomSite): Used for authentication endpoints and other services
- Defined in: `Network` → `<urlPathPrefix>` AND `CustomSite` → `<urlPathPrefix>`
- Example: `mysitevforcesite`
- **Must be synchronized** - both files must have identical values
By default, Salesforce differentiates these URLs by appending `vforcesite` suffix to the Network/CustomSite URL.
## URL Update Workflow
When updating site URLs, follow this workflow:
### Step 1: Discover All URL References
Search for all occurrences of `urlPathPrefix` across the project metadata files.
**For agents**: Use the `search_files` tool with these parameters:
- path: `force-app/main/default`
- regex: `urlPathPrefix`
- file_pattern: `*.xml`
**For humans**: Use your IDE's search functionality or command line tools:
```bash
# Using grep
grep -r "urlPathPrefix" force-app/main/default --include="*.xml"
# Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
# Search for: urlPathPrefix
# Files to include: *.xml
```
### Step 2: Identify URL Groups
Determine which files belong to which URL group:
- **Primary URL Group**: `DigitalExperienceConfig`
- **Secondary URL Group**: `Network` AND `CustomSite`
### Step 3: Update URLs Consistently
Update the `<urlPathPrefix>` value in each file:
- **DigitalExperienceConfig**: Update to new primary URL
- **Network**: Update to new secondary URL (typically primary URL + `vforcesite`)
- **CustomSite**: Update to **same value as Network** (must be synchronized)
### Step 4: Validate Naming Convention
Ensure URL values follow best practices:
- Use lowercase letters only
- Avoid special characters except hyphens where appropriate
- Keep URLs concise and meaningful
### Step 5: Verify Consistency
Before deploying, confirm:
- [ ] Primary URL in `DigitalExperienceConfig` is set correctly
- [ ] Secondary URL in `Network` matches `CustomSite` exactly
- [ ] URLs are properly differentiated (typically via suffix)
- [ ] All URL values follow naming conventions
## Example URL Configuration
```text
ChatterNetworkPicasso Site (Primary):
DigitalExperienceConfig: <urlPathPrefix>bestsupport</urlPathPrefix>
Network + ChatterNetwork Site (Secondary):
Network: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
CustomSite: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
```
## Common Pitfalls to Avoid
❌ **Don't** update only one or two files - all three must be updated
❌ **Don't** use different values in Network and CustomSite
❌ **Don't** use the same URL for both Primary and Secondary groups
❌ **Don't** skip the discovery step with `search_files`
✅ **Do** use `search_files` to find all occurrences first
✅ **Do** maintain URL differentiation between the two groups
✅ **Do** follow lowercase naming conventionsRelated skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |