- Overview
- Developer Expectations
- Preconditions
- Build and run site locally
- Add Editing host to XM Cloud
- Documentation
Solterra & Co. is a polished, editorial-style template great for lifestyle brands, with a homepage, subpage, navigation, and footer. This demo site is built to showcase XM Cloud capabilities using the Content SDK.
- Tailwind-based styling (Shadcn)
- Personalized homepage via URL parameters
- Modular components for reuse
- Localization support for English (en) and Canadian English (en-CA)
- You have deployed your XM Cloud environment already. If not follow this link: Deploy a Project and Environment
-
Clone the repository (if not yet done)
git clone https://github.com/Sitecore/xmcloud-starter-js -
Starting from the root of the repository navigate to site app folder
cd examples\kit-nextjs-article-starter\ -
Copy the environment file
.env.remote.example -
Rename the copied file to
.env.local -
Edit
.env.localand provide a value forSITECORE_EDGE_CONTEXT_ID,NEXT_PUBLIC_DEFAULT_SITE_NAME,NEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID,SITECORE_EDITING_SECRET. (More info: Environment variables in XM Cloud) Optionally setNEXT_PUBLIC_SITE_URLorNEXT_PUBLIC_BASE_URLto your public site origin when server-rendered code must build absolute URLs without the requestHostheader (see.env.remote.example). -
Install dependencies: from
kit-nextjs-article-starterrunnpm install -
Run the site locally:
npm run dev -
Access the site: Visit http://localhost:3000 in your browser.
If you have not enabled the split deployment feature your editing hosts are automatically created based on the xmcloud.build.json if enabled is set to true. The following steps are not required. Only if you have enabled the split deployment feature, continue with the next steps.
- Go to Sitecore Cloud Portal https://portal.sitecorecloud.io
- Open XM Cloud Deploy
- Select Project that has been deployed
- Switch to tab "Editing Hosts"
- Click "Add editing host"
- Provide Editing host name
kit-nextjs-article-starteras per xmcloud.build.json - Check if the link to authoring environment is set correctly (should be by default)
- Check if the source code provider is set correctly (should be by default)
- Check if the GitHub Account is set correctly (should be by default)
- Check if repository is set correctly (should be by default)
- Check if Branch is set correctly (should be by default)
- Set the Auto deploy option (recommended)
- No custom environment variables are required
- Click "Save"
- On the new editing host click the ... and hit "Build and deploy"
Additional Info: You do not have to create rendering host items in XM Cloud as those are created automatically for you when creating a rendering host. Mapping of sites using site templates to editing hosts is also done automatically.
- Skills: capability map for this starter — High-level capability groupings; see also the repo docs/Skills.md.
- Sitecore Content SDK for XM Cloud