Configure your collections

Last modified: October 22nd, 2024

As of October 2024, this documentation is only applicable to Sites using Unified Configuration. For Sites that have not migrated to Unified Configuration, please read the documentation on our non-unified documentation website.

After syncing your Site files, configuring your Collections is one of the first steps in creating your CloudCannon configuration file. During your initial Site setup, CloudCannon only requires minimal Collection configuration: a name and path for each Collection.

You can configure your Collections at any time to customize the experience for your team members.

To configure your Collections:

  1. Navigate to the Editing page, under Site Settings, and click the Edit your configuration file button to open your CloudCannon configuration file in the Data Editor.
  2. Identify the Collections array under the Collections and paths section.
  3. Click on an existing Collection in the array or click the + Add Collection button to add a new Collection.
  4. Edit your Collection configuration. The CloudCannon configuration file is organized into four sections for each Collection: Collection setup, Collection display, Collection editing interfaces, and Creating and updating pages. You can click on any section to open editing interfaces for each Collection configuration key.
  5. Once you are happy with your configuration, save your changes by clicking the Save button in the top right of your editing interface.

CloudCannon will commit your Collection configuration to your Git repository.

If you would prefer to, you can configure your Collections in the Source Editor or your local development environment. The following code is an example of the minimum configuration required for two Collections in CloudCannon.

cloudcannon.config.yaml
copied
collections_config:
  blog:
    path: content/posts
  data:
    path: _data

Configure all your Collections under the collections_config key in your CloudCannon configuration file.

Each Collection must have a unique key name.

The collections.[*].path key tells CloudCannon where to find the files for your Collection. The value for this key is relative to your Site source folder.

cloudcannon.config.json
copied
{
  "collections_config": {
    "blog": {
      "path": "content/posts"
    },
    "data": {
      "path": "_data"
    }
  }
}

Configure all your Collections under the collections_config key in your CloudCannon configuration file.

Each Collection must have a unique key name.

The collections.[*].path key tells CloudCannon where to find the files for your Collection. The value for this key is relative to your Site source folder.

For more information about options you can configure in your Collections, please read our Collections reference documentation.

Open in a new tab