Choose your preferred SSG:
Choose your preferred SSG:

Migrating to global configuration files

How you set global configuration in CloudCannon has changed. We recommend updating, but the previous configuration will continue to work. CloudCannon now uses specific files rather than relying on your SSG configuration files. This allows us to provide a consistent experience across SSGs as we add more. This also separates the configuration itself, making your sites more maintainable.

To migrate, create a global configuration file with these instructions, then move your configuration here.

Many of the configuration keys are the same, and listed in setting global configuration options. Globally-scoped configuration cascade values must also be moved if a global configuration file exists.

Here are the notable changes for your specific SSG:

Jekyll content

CloudCannon used to read global configuration from your _config.yml file.

Base collection configuration is still automatically read from Jekyll itself. Collection settings are now set under collections_config in your global configuration file rather than in collections or cloudcannon.collections inside _config.yml. The contents are the same, except for these renamed keys. Read more about defining your collections.

Including data files is now set in data_config in your global configuration file rather than in in _config.yml. The format is the same.

Your global uploads path is now set in paths.uploads in your global configuration file rather than in uploads_dir in _config.yml. The format is the same.

Hugo content

Eleventy content

Other content

Renamed keys

Since collection-level configuration is now always defined separately, there’s no longer any risk of clashing with SSG-specific configuration. We’ve taken this chance to clean up and rename the configuration keys that started with underscores in an effort to reduce that risk:

  • _collection_groups to collection_groups
  • _source_editor to source_editor
  • _subtext_key to subtext_key inside collections_config
  • _image_key to image_key inside collections_config
  • _image_size to image_size inside collections_config
  • _singular_name to singular_name inside collections_config
  • _singular_key to singular_key inside collections_config
  • _disable_add to disable_add inside collections_config
  • _icon to icon inside collections_config
  • _add_options to add_options inside collections_config
  • _sort_key to sort_key inside collections_config

sort_key has been superseded by sort and sort_options has been introduced.

The remaining underscore-prefixed configuration keys are not renamed so they can be identified as part of the configuration cascade.

Was this article helpful? or Suggest an improvement >