Skip to content

Complete demo site for Optimizely SaaS CMS, fully taking all content from Optimizely Graph

License

Notifications You must be signed in to change notification settings

episerver/cms-saas-vercel-demo

Repository files navigation

Optimizely CMS Demo Site

License

Important

The latest version of this site contains a new content pack and schema. When updating an existing site, make sure to apply the latest content pack. If you need to, you can use the "CMS Reset" command line tool to clear your current instance.

Contents

1. Introduction

This repository contains content and frontend that form the Optimizely SaaS CMS Demo Site.

If you're looking to build a new site from scratch, please use the Create Next App Template to create an empty frontend using the same structure and tooling as this demo site.

2. Getting started

2.1. Requirements

Make sure you're good to go, by:

  • Requesting an Optimizely CMS instance using Sign-up for the program
  • Ensure you have a GitHub account
  • Ensuring you have (at least) a hobby plan account at Vercel, or are comfortable creating one

After signing up for the beta instance and provisioning of the instance, you'll get an e-mail with the keys and instructions to activate your account.

2.2. Deploying & Configuring

Follow these instructions to configure the CMS

After you've completed the CMS configuration instructions and collected the needed information, click the "Deploy to vercel" button below, to deploy this site to your Vercel Account

Deploy with Vercel

Environment variable Instruction
OPTIMIZELY_CMS_URL The URL where the Optimizely CMS can be reached by the build process; for example: https://example.cms.optimizely.com/
OPTIMIZELY_GRAPH_SECRET The Content Graph Secret can be made visible on the CMS Dashboard, within the "Render Content" section.
OPTIMIZELY_GRAPH_APP_KEY The Content Graph App key, which is shown on the CMS Dashboard, within the "Render Content" section.
OPTIMIZELY_GRAPH_SINGLE_KEY The Content Graph Single key , which is shown on the CMS Dashboard, within the "Render Content" section.

When the deployment has succeeded, the following steps are needed to both fix the "Page not found" on the homepage and enable "Preview".

Fix "Not Found" error and enable preview

2.3. Additional configuration options

Please refer to the Supported environment variables document for all supported configuration options for the frontend. The steps above only outine the mimimum required configuration to obtain a working demo site. Many of the included features require additional configuration to be enabled.

Please note: every configuration change to the environment variables requires a new deployment to become active.

3. Content pack upgrade

When installing the latest version of this demo site, you might need to apply a content pack update.

Important

When the currently installed contentpack was not provided from this repository (for example from the visual-builder-beta), the content cannot be upgraded due to conflicts. Use the "CMS Reset" command line tool to clean your CMS instance and start fresh.

To upgrade the content pack, take these steps:

  • Import the new content pack as described on Configuring the CMS. The only difference here is that you will not create a new Application, but update the existing one use the newly imported homepage.
  • Make sure to run the Graph Full Index as specified

Running this upgrade process will yield you a working demo site, however it will now contain content-types that are no longer supported. If you need them back you can restore the code from apps/old_cms_types in your fork/clone of this repository.

4. Product specific instructions

4.1. Content Recommendations

For Content Recommendations to work, the following steps are needed:

  1. Configure Content Recommendations using the environment variables of the Next.JS Optimizely One package
  2. Add the Content Recommendations widget using either the block (Page) or element (Experience), you will need to configure:
    • The API Key of the delivery, which is shown as value of 'data-api-key=' in the example code within Content Recommendations
    • The number of recommendations to show

5. Further documentation