Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.
Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.
Collection schemas are used to:
To create a schema:
- Create a file with the contents and type you need (e.g.
- Configure a collection in your global configuration file to use that file
You can define multiple schemas for a collection, each with their own file and options:
Each entry in
schemas has the following options available:
The create path definition to control where new files are saved to inside this collection. Defaults to
Read more details for
create when choosing where to create new files.
Sets the behavior when editing existing files with inputs not present in the schema with
remove_extra_inputs set to
false. Defaults to
false. Has no effect if
true, non-schema inputs are hidden in the Data Editor.
false, non-schema inputs are visible in the Data Editor.
Displayed in the add menu when creating new files, also used as the icon for collection files if no other preview is found. Must be a Material Icon name. Defaults to
Displayed in the add menu when creating new files. Defaults to a formatted version of the key.
Preview your unbuilt pages (e.g. drafts) to another page’s output URL. The Visual Editor will load that set preview URL and use the Data Bindings and Previews to render your new page without saving.
new_preview_url: /about/ will load the
/about/ URL on new or unbuilt pages in the Visual Editor.
The path to the schema file. Relative to the root folder of the site. Required.
Controls whether or not inputs are sorted to match the schema when editing existing files. Defaults to
Non-schema inputs are ordered after schema inputs if not removed with
Sets the behavior when saving files with empty inputs. Defaults to
true, empty inputs are removed before persisting the data to the source file.
false, empty inputs are persisted in the source file.
Removed inputs are available for editing again provided they are in the matching schema file. Inputs are considered empty if the value is
Sets the behavior when editing existing files with inputs not present in the schema. Defaults to
true, non-schema inputs are removed before the editor loads, and subsequently removed from the source file if saved.
false, non-schema inputs are either hidden or visible in the editor depending on
hide_extra_inputs, but still kept in the source file on save.
If any inputs conflict with schema (e.g. a file's
title is a string and the schema's
title is an object), the schema version takes priority.
The preview definition for changing the way collection items with this schema are previewed across the editor. Defaults to using the collection's
All preview options are available for schemas, and are the same as the ones listed in the collections configuration options:
See the preview options documentation for detailed information on setting this option.
Schemas now support the new
preview option. Read our migration guide if you are still using the old options: