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.
- 1. Introduction
- 2. Getting started
- 3. Content pack upgrade
- 4. Product specific instructions
- 5. Further documentation
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.
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.
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
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
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.
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.
For Content Recommendations to work, the following steps are needed:
- Configure Content Recommendations using the environment variables of the
Next.JS Optimizely One package
- 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