/Sitecore.HabitatHome.Platform

This repository is used to share Sitecore demo assets with external contributors and partners

Primary LanguageCSSMozilla Public License 2.0MPL-2.0

Introduction

HabitatHome Demo and the tools and processes in it is a Sitecore® solution example built using Sitecore Experience Accelerator™ (SXA) on Sitecore Experience Platform™ (XP) following the Helix architecture principles.

Important Notice

Is Habitat Home a starter kit or template solution

No. You should not clone this repository for the purposes of starting a new Sitecore project. There are other community solutions which can be used as a starter for Helix-based Sitecore implementations. Habitat Home is intended as a demo site demonstrating the full Sitecore platform capabilities and development best practices.

Is Habitat Home supported by Sitecore

Sitecore maintains the Habitat Home example, but Habitat Home code is not supported by Sitecore Product Support Services. Please do not submit support tickets regarding Habitat.

How can I get help with Habitat Home

For usage questions regarding Habitat Home, installation or code, please use Sitecore Stackexchange or #habitathome on Sitecore Community Slack.

You can use GitHub to submit bug reports or feature requests for Habitat Home. Please do not submit usage questions via GitHub.

License

Please read the LICENSE carefully prior to using the code in this repository.

Support

The code, samples and/or solutions provided in this repository are unsupported by Sitecore PSS. Support is provided on a best-effort basis via GitHub issues or Slack #habitathome (see end of README for additional information).

It is assumed that you already have a working instance of Sitecore XP and all prerequisites prior to installing the demo. Support for product installation issues should be directed to relevant Community channels or through regular Sitecore support channels.

Warranty

The code, samples and/or solutions provided in this repository are for example purposes only and without warranty (expressed or implied). The code has not been extensively tested and is not guaranteed to be bug free.

Getting Started

Prerequisites

The latest Habitat Home demo is built to support Sitecore Experience Platform 9.3 using Sitecore Experience Accelerator (SXA) 9.3.

In order to follow the build instructions in the README, you need to have MSBuild Tools for Visual Studio 2019 installed.

Optional Modules

The following optional modules enable synchronization with Dynamics CRM or Salesforce CRM (relevant account required)

SSL Only

The demo is configured for HTTPS/SSL. Please ensure that you create an HTTPS binding with appropriate self-signed certificates.

Clone this repository

Clone the Sitecore.HabitatHome.Platform repository locally - defaults are configured for C:\Projects\Sitecore.HabitatHome.Platform.

  • https: git clone https://github.com/Sitecore/Sitecore.HabitatHome.Platform.git
  • ssh: git clone git@github.com:Sitecore/Sitecore.HabitatHome.Platform.git

Parameters - explained

The following is a list of default values / assumptions for settings ( cake-config.json )

Parameter Description Default Value
ProjectFolder Location of Sitecore. HabitatHome. Platform project c:\projects\Sitecore. HabitatHome. Platform
Website Root Location of IIS Website Root c:\inetpub\wwwroot\habitathome.dev.local
XConnect Root Location of IIS xConnect Site Root C:\Inetpub\wwwroot\habitathome_xconnect.dev.local\
Instance Url Url of site https://habitathome.dev.local/
BuildConfiguration 'Debug/Release' point to NuGet, 'Local' copies DLLs from an existing installation Debug
DeployFolder Used for WDP generation and Azure deployments C:\deploy
Version Version of Sitecore being targeted. Must match official 3-digit version 9.3.0

Deploying HabitatHome Locally

Prior to attempting the demo installation, ensure you have a working Sitecore XP 9.3 instance. Detailed installation instructions can be found at doc.sitecore.com.

Local Build / Docker Deployment

Prerequisites

  1. Windows 1809 or higher, but prefer version 1909
  2. The latest Docker Desktop Docker Desktop
  3. From the Docker Desktop menu, you can toggle which daemon (Linux or Windows) the Docker CLI talks to. Select Switch to Windows containers to use Windows containers
  4. Pre-build docker-images local or taken from your own ACR

Starting the demo

  1. Run docker-compose up -d
  2. Browse to http://localhost:44001
  3. .\build.ps1 -DeploymentTarget Docker

Local Build / Deployment

The hostname habitathome.dev.local is used in the SXA Hostname (Site Grouping)

If you do not use habitathome.dev.local you will need to modify the Host Name in /sitecore/content/Habitat SXA Sites/Habitat Home/Settings/Site Grouping/Habitat Home after successfully deploying the site. The Habitat Home site will not respond / render correctly until this value is modified.

If you do not want to use the default settings, you need to adjust the appropriate values in cake-config.json file based on the values described earlier.

The cake script will automatically create a publishSettings.targets.user file with the value of the InstanceUrl specified in the cake-config.json file.

Installation

All installation instructions assume using PowerShell 5.1 in administrative mode.

1. Deploy Sitecore. HabitatHome. Platform

IMPORTANT: Publish Sitecore Instance after installing all required and optional modules BEFORE trying to deploy Habitat Home*

From the root of the solution, run .\build.ps1

Note: If the deployment fails at Sync-Unicorn or Deploy-EXM-Campaigns step, evaluate and fix the error (if any) and then run .\build.ps1 -Target "Post-Deploy" .

2. Validating deployment

  • Browse to https://habitathome.dev.local (or whatever hostname you selected)
    1. You should see the Habitat Home landing page with a full-width carousel
    2. If you do not see the full-width carousel and instead see the initial Sitecore default landing page, ensure that your Host Name was configured correctly in /sitecore/content/Habitat SXA Sites/Habitat Home/Settings/Site Grouping/Habitat Home and that the site has published successfully

Additional Settings

Disable Unicorn Serialization

When Unicorn is active, the Content Editor will display warnings that certain items are controlled by Unicorn. If you wish to disable Unicorn serialization, open the Web.config file in your webroot and update the following appSetting

<add key="unicorn:define" value="Disabled"/>

This appSetting is Enabled by default. Setting it to Disabled ensures that none of the Unicorn serialization configuration files are loaded.

Contribute or Issues

Please post any issues on Slack Community #habitathome channel or create an issue on GitHub. Contributions are always welcome!