- Description:
This key defines which Schemas are available to populate files in this Collection.
Defining a Schema for a collection will add it to the + Add button dropdown at the top right of the Collection browser.
If undefined, clicking the + Add button to add a new file to a Collection will clone the last file in the Collection and clear any markup content and the values of any structured data keys.
- Appears in:
└── collections_config └── * └── schemas- Type:
Object<schemas.*>- Values:
- Examples:
In this example, the + Add button in the Collection browser has an option for
Customer Storywhich will populate a new file in theblogCollection with the contents of thecustomer_story.mdxfile. If the Schema file is updated, CloudCannon will preserve the old inputs to prevent you from losing structured data in older files.Copied to clipboardcollections_config: blog: schemas: customer_story: path: /schemas/customer_story.mdx reorder_inputs: true hide_extra_inputs: false remove_empty_inputs: false remove_extra_inputs: false name: Customer Story icon: notes{ "collections_config": { "blog": { "schemas": { "customer_story": { "path": "/schemas/customer_story.mdx", "reorder_inputs": true, "hide_extra_inputs": false, "remove_empty_inputs": false, "remove_extra_inputs": false, "name": "Customer Story", "icon": "notes" } } } } }In this example, the + Add button in the Collection browser has an option for
Term Definitionwhich will populate a new file in theglossaryCollection with the contents of theglossary_term.ymlfile. Theterm_descriptioninput is configured specifically for files created with this Schema.Copied to clipboardcollections_config: glossary: schemas: term_definition: path: /schemas/glossary_term.yml name: Term Definition icon: abc _enabled_editors: - data _inputs: term_description: type: textarea comment: Keep this as short as possible (i.e., 125 characters). context: open: false title: Help icon: help content: Try not to use the term name in the description. options: show_count: true{ "collections_config": { "glossary": { "schemas": { "term_definition": { "path": "/schemas/glossary_term.yml", "name": "Term Definition", "icon": "abc", "_enabled_editors": [ "data" ], "_inputs": { "term_description": { "type": "textarea", "comment": "Keep this as short as possible (i.e., 125 characters).", "context": { "open": false, "title": "Help", "icon": "help", "content": "Try not to use the term name in the description." }, "options": { "show_count": true } } } } } } } }