Data configuration

Learn how to migrate your existing Site to CloudCannon's Unified Configuration file format.

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. Update the format of your data sets#

This step of the migration guide is only relevant to Sites using Eleventy, Hugo, or Jekyll as their SSG.

CloudCannon no longer exclusively reads data sets at build time. You must update your data configuration to allow CloudCannon to read your data sets at any time.

CloudCannon no longer uses the following data configurations:

cloudcannon.config.yaml
copied
data_config: true
cloudcannon.config.json
copied
{
  "data_config": true
}
cloudcannon.config.yaml
copied
data_config:
  locations: true
cloudcannon.config.json
copied
{
  "data_config": {
    "locations": true
  }
}
cloudcannon.config.yaml
copied
data_config:
  locations:
    path: data/locations.yml
    parser: yaml

The key data_config.*.parser is now defunct.

cloudcannon.config.json
copied
{
  "data_config": {
    "locations": {
      "path": "data/locations.yml",
      "parser": "yaml"
    }
  }
}

The key data_config.*.parser is now defunct.

Please update data_config to:

cloudcannon.config.yaml
copied
data_config:
  locations:
    path: data/locations.yml
cloudcannon.config.json
copied
{
  "data_config": {
    "locations": {
      "path": "data/locations.yml"
    }
  }
}

2. 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:

  1. data_config.*.parser

Open in a new tab