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.
What is a configuration file?#
Global configuration files contain your global CloudCannon configuration and top-level values for the configuration cascade.
Configuration is set in one of the following supported file types. CloudCannon will search the root directory for the first matching file from this list.
cloudcannon.config.json
cloudcannon.config.yaml
cloudcannon.config.yml
This file is stored in the root directory of your repository (i.e. /cloudcannon.config.*
). Alternatively, you can specify a custom location in the Editing section of your site settings.
Creating a configuration file#
The global configuration file is the heart of your integration with CloudCannon. You can create your configuration file locally or using the CloudCannon configuration GUI. When creating a new site, CloudCannon will guide you through creating a configuration file.
Here's an example file:
Options#
Global configuration files have the following options available:
The subpath your output files are mounted at.
Contains definitions for your collections, the related sets of content files for your site grouped by folder. Entries are keyed by your collection key, and contain configuration specific to that collection. Read more about defining your collections and the available configuration.
Controls which collections are displayed in the site navigation and how those collections are grouped. Defaults to splitting all available collections between Pages, Blogging and Data groups. Read more about configuring your navigation section.
Controls what data sets are available to populate select and multiselect inputs.
Provides scope to configure settings at a file level, without configuring a collection, or modifying files.
Contains settings for the default editor actions on your site. The only available option is default_path
, which sets what URL the editor opens from the dashboard.
Global paths to common folders. These are often automatically populated from your SSG, and not all paths are relevant to all SSGs. Each path is relative to source
. The available keys are:
uploads
for the default location of newly uploaded site files.dam_uploads
for the default location of newly uploaded DAM files.static
for the location of statically copied assets.dam_static
for the location of statically copied assets for DAM files.
uploads
and dam_uploads
have a number of dynamic placeholders available.
Base path to your site source files, relative to the root folder of your site.
Contains settings for the behavior and appearance of the Source Editor.
Timezone of your site in IANA format. Used by date and datetime inputs. Defaults to Etc/UTC
.
Contains settings for various Markdown engines. See the Configure your Markdown engine documentation.
Templates for commit messages when saving changes. See the Configure your commit templates documentation.
Configuration cascade options#
Global configuration files are the base level for defining options in the configuration cascade, allowing you to define these options here at a global scope.