Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Latest commit

 

History

History
141 lines (85 loc) · 5.1 KB

INSTALLATION.md

File metadata and controls

141 lines (85 loc) · 5.1 KB

Installation

Installation instructions are written for users of the SFDX CLI. The use of scratch orgs is assumed but not required. If not using a scratch org, setup a sandbox environment via SFDX and point to that instance.

Deployments via the Salesforce Ant Migration Tool will also work but are not tested regularly.

Dependencies

Demo Implmentation

A demo site is included within this repository to enable teams to quickly deploy a copy of the theme along with navigable pages. This is a great way to get a feel for the theme without having to do a lot of setup.

For ease of deployment, set an environment variable in terminal before executing additional commands. For example:

orgname="uswdsThemeDemoOrg"

Steps

  1. Create a new scratch org

sfdx force:org:create -f config/scratch-def.json -a $orgname

  1. Deploy main USWDS Theme source to org

sfdx force:mdapi:deploy -d src/ -w 100 -u $orgname

  1. Create a new community named "uswdsThemeDemo using the Customer Account Portal template

sfdx force:community:create --name "uswdsThemeDemo" --templatename "Customer Account Portal" --urlpathprefix uswdsThemeDemo -o $orgname

  1. Deploy example components to org (6 examples)

sfdx force:mdapi:deploy -d examples/uswdsBreadcrumb -w 100 -u $orgname

sfdx force:mdapi:deploy -d examples/uswdsCard -w 100 -u $orgname

sfdx force:mdapi:deploy -d examples/uswdsCollection -w 100 -u $orgname

sfdx force:mdapi:deploy -d examples/uswdsPagination -w 100 -u $orgname

sfdx force:mdapi:deploy -d examples/uswdsStepIndicator -w 100 -u $orgname

sfdx force:mdapi:deploy -d examples/uswdsTag -w 100 -u $orgname

  1. ⚠️⚠️ Open newly created org and verify community has been created. If you do not see "uswdsThemeDemo" on this page, continue to refresh until it appears.

sfdx force:org:open -u $orgname -p lightning/setup/SetupNetworks/home

  1. Once the community appears, proceed to next step.

sfdx force:mdapi:deploy -d examples/uswdsThemeDemo -w 100 -u $orgname

First Time Install

Depending on your development workflow and tools available, varying instructions are required. For each step of the installation process, SFDX and Ant instructions are provided

1.0 Configure Org

Scratch Orgs

Create a scratch org with communities enabled. sfdx force:org:create -f config/scratch-def.json -a {scratchOrgName}

Sandboxes

Enable Communities in your Salesforce org (Setup > Digital Experiences > Settings. Select Enable Digital Experiences.)

2. Deploy Code

SFDX

sfdx force:mdapi:deploy -d src/ -w 100 -u {scratchOrgName}

sfdx force:org:open -u {scratchOrgName}

Ant

Set local build.properties to point at sandbox.

ant deployCode

Example files can also be deployed by entering (always deploy src/ folder before deploying examples)

ant deployCode -Dsf.deployRoot="/examples/uswdsTag"

3. Create Community

SFDX

sfdx force:community:create --name {community name} --templatename "Customer Account Portal" --urlpathprefix {path prefix if any} -o {scratchOrgName}

Sandbox

  • For new communities
    • Create new community (Setup > Digital Experiences > All Sites > New > Select Customer Account Portal)
    • Provide Name > Builder > Theme
    • Select USWDS Lightning Community
  • For existing communities
    • (Setup > Digital Experiences > All Communities > Builder > Theme)
    • Select USWDS Lightning Community
  • Enter name of community and a community specific url (if desired)

4. Activate Theme

  • Setup > Digital Experiences > All Sites > {name of your community} > Builder
  • Click brush icon on left-hand menu
  • Click Change Theme
  • Select USWDS v2.1.0

5. Additional Steps

See Additional Community Setup Information

Upgrading Theme

Read the Release Notes for each version between your current and desired version. The notes will highlight any breaking changes or destructive packages that are required for deployment. Deploy each minor version in succession until reaching current.

Additional Community Setup Information

We have a wiki which contains more information about customizing the theme and getting started.