CloudCannon offers different configuration options for each input and editor. Use this to improve the editing experience for your sites. Configuration can be set from a number of sources, from lowest priority to highest:
Inside each of these sources, the configuration groups are
Configuration for inputs and editables is set with properties on the key matching the same name. (e.g.
_inputs.image matches the
image front matter input).
Site configuration - configure something everywhere on your site. For example:
Collection configuration - configure inputs for all files within a collection. For example:
Front matter - configure inputs inside a single file. For example:
Containing structure - configure inputs inside an array structure. For example:
For nested structured data, you can nest
_structures alongside the other configuration groups inside a structure definition.
The configuration cascade works by finding the most specific configuration set for any given key (e.g.
_structures defined in front matter are prioritized over global configuration).
_structures configurations is found in the cascade, there’s no reason to keep looking. This means the most specific value is used in place of any less specific values.
_inputs configuration works differently, each entry is merged down the cascade. This allows you to define a
comment globally, then a different
label for inputs in a collection without redefining the
comment. You can stop the cascade at any given point by setting
To demonstrate, the comment would not display for the input when editing the front matter: