You may not need to complete every step in this guide but please carefully review each step to see if it is applicable to your Site's configuration.
1. Explicitly configure attributes for file content Editable Regions#
CloudCannon no longer automatically applies Editable Regions to file content without an explicit attribute. Previously, CloudCannon would attempt to discover these regions automatically when it encountered a content variable as the only child of an element, for example:
This markup detection was fragile in certain circumstances, and couldn't be explicitly toggled on or off.
For sites using Unified Configuration, CloudCannon will no longer discover these regions automatically. Instead, an explicit attribute now exists to add an Editable Region for the content of a file.
The below code shows how to configure the data-cms-edit="content"
attribute to configure Editable Regions for your content:
2. Configure _snippets_imports#
This step of the migration guide is only relevant to Sites using Hugo or Jekyll as their SSG.
Add the _snippets_imports
corresponding to your SSG:
3. Configure path.static#
This step of the migration guide is only relevant to Sites using Hugo as their SSG.
CloudCannon no longer uses build integrations to set path.static
automatically. Please set the path.static
key to static
.
To configure paths.uploads
, you must also have configured paths.static
first.
4. Configure your Markdown engine#
This step of the migration guide is only relevant to Sites using Jekyll or Hugo as their SSG.
CloudCannon supports two Markdown engines: CommonMark and Kramdown. Because most SSGs use CommonMark, CloudCannon assumes you are using this engine by default in the Unified Configuration file format.
Jekyll is on of the few SSGs which use Kramdown by default. If your Site uses Kramdown, you must specify your Markdown engine in your CloudCannon configuration file.
Previously CloudCannon used your SSG configuration and build to infer which markdown.options
you would want. With Unified Configuration, this needs to be configured explicitly. Below is a list of suggestions about options that you might want to enable.
- For Hugo sites, check your Hugo config file
xhtml
should matchmarkup.goldmark.renderer.xhtml
.breaks
should matchmarkup.goldmark.renderer.hardWraps
.table
should matchmarkup.goldmark.extensions.table
.strikethrough
should matchmarkup.goldmark.extensions.strikethrough
.treat_indentation_as_code
should be set totrue
- For Jekyll sites
breaks
should matchkramdown.hard_wrap
from your Jekyll config filetreat_indentation_as_code
should be set totrue
table
should be set totrue
attributes
should be set totrue
5. Defunct configuration options#
CloudCannon no longer uses some configuration options in the Unified Configuration file format. Although leaving these keys in your Site files will not harm your Site, they also will not function. If you want to maintain a clean configuration file, we recommend removing defunct configuration options.
We recommend deleting the following keys:
paths.data
paths.collections
paths.layouts
paths.includes