Your CloudCannon configuration file allows you to customize your app experience by configuring CloudCannon's appearance and functionality.
This reference covers all keys available in your CloudCannon configuration file. To learn more about the configuration file, please read our documentation on the CloudCannon configuration file.
The configuration file can be named cloudcannon.config.yml, cloudcannon.config.yaml, cloudcannon.config.json, cloudcannon.config.cjs, or cloudcannon.config.js and should be placed in the root directory of your repository.
For IDE autocomplete and validation, see our JSON Schemas and TypeScript Types.
- Description:
This key represents the main CloudCannon configuration schema.
- Type:
Object- Properties:
This key defines which base URL (or subpath) CloudCannon should use when matching output URLs for your Site.
The base URL will prefix the output URL of each file.
Show examplesHide examples
In this example, we have configured the base URL to
/documentation/so all output URLs will be prefixed with this path.Copied to clipboardbase_url: /documentation/{ "base_url": "/documentation/" }This key defines custom order and grouping for Collections in your Site Navigation.
The value is an array of group objects. Each group object must contain a
headingkey and acollectionskey.If undefined, CloudCannon will sort your Collections in the order they are defined under the
collections_configkey.Show examplesHide examples
In this example, we have configured Collection groups to organize Collections into "Content" and "Data Files" sections in the Site Navigation.
Copied to clipboardcollection_groups: - heading: Content collections: - pages - blog - heading: Data Files collections: - data{ "collection_groups": [ { "heading": "Content", "collections": [ "pages", "blog" ] }, { "heading": "Data Files", "collections": [ "data" ] } ] }This key defines your Collections.
Show examplesHide examples
In this example, we have configured a
blogCollection. Key settings include two Schemas to populate files with different content, a Blog Tags input populated by a fixed data set, and a custom Create Path to generate file names from structured data.Copied to clipboardcollections_config: blog: path: content/blog glob: - '!_index.md' name: Blog icon: post_add url: /blog/[full_slug]/ documentation: url: https://example.com/travel-blog-style-guide text: Documentation icon: auto_stories description: |- This Collection is for *Travel blogs* and *Customer stories*. If your have any questions, please contact Heather. _editables: _enabled_editors: - content _inputs: blog_tags: type: multiselect label: Blog type comment: Select a blog type context: open: false title: Help icon: help content: | Blog tags help our users filter articles by topic. options: values: _select_data.blog_topics _select_data: blog_topics: - Opinion - Feature - Resource create: extra_data: filename: '{date|year}-{date|month}-{date|day}-{title}' path: '[relative_base_path]/{filename|slugify}.[ext]' disable_add: false disable_add_folder: false disable_file_actions: false schemas: blog: path: schemas/travel_blog.md name: Blog Post icon: post_add customer_story: path: schemas/customer_story.md name: Customer Story icon: post_add schema_key: _blog_template include_developer_files: false{ "collections_config": { "blog": { "path": "content/blog", "glob": [ "!_index.md" ], "name": "Blog", "icon": "post_add", "url": "/blog/[full_slug]/", "documentation": { "url": "https://example.com/travel-blog-style-guide", "text": "Documentation", "icon": "auto_stories" }, "description": "This Collection is for *Travel blogs* and *Customer stories*.\n\nIf your have any questions, please contact Heather.", "_editables": null, "_enabled_editors": [ "content" ], "_inputs": { "blog_tags": { "type": "multiselect", "label": "Blog type", "comment": "Select a blog type", "context": { "open": false, "title": "Help", "icon": "help", "content": "Blog tags help our users filter articles by topic.\n" }, "options": { "values": "_select_data.blog_topics" } } }, "_select_data": { "blog_topics": [ "Opinion", "Feature", "Resource" ] }, "create": { "extra_data": { "filename": "{date|year}-{date|month}-{date|day}-{title}" }, "path": "[relative_base_path]/{filename|slugify}.[ext]" }, "disable_add": false, "disable_add_folder": false, "disable_file_actions": false, "schemas": { "blog": { "path": "schemas/travel_blog.md", "name": "Blog Post", "icon": "post_add" }, "customer_story": { "path": "schemas/customer_story.md", "name": "Customer Story", "icon": "post_add" } }, "schema_key": "_blog_template", "include_developer_files": false } } }In this example, we have configured a
teamCollection. Key settings include custom sorting options, add options, and Card previews.Copied to clipboardcollections_config: team: path: _data/team name: Our Team singular_name: Team Member icon: groups disable_url: true description: This Collection has a file for every member of our team! preview: text: - key: name subtext: - key: job_title icon: - key: profile_picture sort: key: name order: ascending sort_options: - key: name order: ascending label: Name (A-Z) - key: name order: descending label: Name (Z-A) - key: job_title order: ascending label: Job Title (A-Z) - key: date order: descending label: Job Title (Z-A) _enabled_editors: - data add_options: - name: Office Locations icon: map href: /our-offices schemas: manager: path: schemas/manager.yml name: Manager icon: face employee: path: schemas/employee.yml name: Employee icon: support_agent{ "collections_config": { "team": { "path": "_data/team", "name": "Our Team", "singular_name": "Team Member", "icon": "groups", "disable_url": true, "description": "This Collection has a file for every member of our team!", "preview": { "text": [ { "key": "name" } ], "subtext": [ { "key": "job_title" } ], "icon": [ { "key": "profile_picture" } ] }, "sort": { "key": "name", "order": "ascending" }, "sort_options": [ { "key": "name", "order": "ascending", "label": "Name (A-Z)" }, { "key": "name", "order": "descending", "label": "Name (Z-A)" }, { "key": "job_title", "order": "ascending", "label": "Job Title (A-Z)" }, { "key": "date", "order": "descending", "label": "Job Title (Z-A)" } ], "_enabled_editors": [ "data" ], "add_options": [ { "name": "Office Locations", "icon": "map", "href": "/our-offices" } ], "schemas": { "manager": { "path": "schemas/manager.yml", "name": "Manager", "icon": "face" }, "employee": { "path": "schemas/employee.yml", "name": "Employee", "icon": "support_agent" } } } } }This key defines globs that filter which files CloudCannon should use for Collection configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.collections.yml.Show examplesHide examples
In this example, each Collection has its own Configuration File in the
.cloudcannon/collections/folder. The value of thecollections_config_from_globkey tells CloudCannon to use all files in that folder that match the glob*.cloudcannon.collections.yml.Copied to clipboardcollections_config_from_glob: - /.cloudcannon/collections/*.cloudcannon.collections.yml{ "collections_config_from_glob": [ "/.cloudcannon/collections/*.cloudcannon.collections.yml" ] }Copied to clipboardposts: path: content/posts icon: event{ "posts": { "path": "content/posts", "icon": "event" } }This key defines commit message templates available when saving changes.
The value is an array of template objects. Each template object can contain optional
label,template_path,template_string,wrap_width,extra_data, and_inputskeys.Commit messages appear on the Review changes modal when you save your changes.
Show examplesHide examples
In this example, we have configured a commit template with a template string and input configuration.
Copied to clipboardcommit_templates: - label: Default template_string: '{commit_type}: {message|trim}' _inputs: commit_type: type: select options: allow_empty: true values: - feature - fix - test cascade: true{ "commit_templates": [ { "label": "Default", "template_string": "{commit_type}: {message|trim}", "_inputs": { "commit_type": { "type": "select", "options": { "allow_empty": true, "values": [ "feature", "fix", "test" ] }, "cascade": true } } } ] }In this example, we have configured a commit template that uses a file for the template content.
Copied to clipboardcommit_templates: - label: Commit message from file template_path: /.git/commit-message.txt{ "commit_templates": [ { "label": "Commit message from file", "template_path": "/.git/commit-message.txt" } ] }In this example, we have configured a commit template with a template string, input configuration, and extra data for nested templates.
Copied to clipboardcommit_templates: - label: Breaking change template_string: '{message}{breaking_change|if=breaking_change_message}' _inputs: breaking_change_message: type: text extra_data: breaking_change: ⚠️ {breaking_change_message}{ "commit_templates": [ { "label": "Breaking change", "template_string": "{message}{breaking_change|if=breaking_change_message}", "_inputs": { "breaking_change_message": { "type": "text" } }, "extra_data": { "breaking_change": "⚠️ {breaking_change_message}" } } ] }This key defines which file or folder data in your Site is available to populate Select Inputs.
Show examplesHide examples
In this example, we have configured data config to make data files available for Select Inputs and Multiselect Inputs.
Copied to clipboarddata_config: authors: path: data/authors.csv offices: path: data/offices{ "data_config": { "authors": { "path": "data/authors.csv" }, "offices": { "path": "data/offices" } } }Configure all data files or folders under the `data_config` key in your [CloudCannon configuration file](/documentation/articles/what-is-the-cloudcannon-configuration-file/).*Select Inputs* and *Multiselect Inputs* which use the `authors` key are populated by the contents of the `authors.csv` file.*Select Inputs* and *Multiselect Inputs* which use the `offices` key are populated by the contents of each file in the `offices` folder.This key defines which Rich Text editors have custom configuration for the associated WYSIWYG toolbar.
For more information, please read our documentation on Rich Text editors.
Show examplesHide examples
In this example, we have configured the Snippet tool for WYSIWYG toolbars in the
blogCollection.Copied to clipboardcollections_config: blog: _editables: content: snippet: true{ "collections_config": { "blog": { "_editables": { "content": { "snippet": true } } } } }This key defines globs that filter which files CloudCannon should use for configuring Rich Text formatting.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.editables.yml.You can use this key anywhere you would use the
_editableskey in the configuration cascade.This key has no default.
Show examplesHide examples
In this example, we have several WYSIWYG Toolbar Configuration Files in the
.cloudcannon/editables/folder, with each file containing multiple definitions. The value of the_editables_from_globkey tells CloudCannon all files in that folder that match the glob*.cloudcannon.editables.yml.Copied to clipboard_editables_from_glob: - /.cloudcannon/editables/*.cloudcannon.editables.yml{ "_editables_from_glob": [ "/.cloudcannon/editables/*.cloudcannon.editables.yml" ] }Copied to clipboardtext: bold: true italic: true underline: true block: format: p h3 undo: true redo: true link: bold: true italic: true underline: true{ "text": { "bold": true, "italic": true, "underline": true }, "block": { "format": "p h3", "undo": true, "redo": true }, "link": { "bold": true, "italic": true, "underline": true } }This key defines which editing interfaces are available by default for files at a given level of the configuration cascade.
Whether an editing interface is available for a specific file is determined by other factors.
Values can be one of the following:
visual,content, ordata.Specifying one or more editing interfaces will disable all unspecified editing interfaces.
You cannot disable the Source Editor with this key.
By default, this key is set to
visual,content, anddata.If undefined at higher levels of the configuration cascade,
_enabled_editableswill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on the Visual Editor, Content Editor, Data Editor, and Source Editor.
Show examplesHide examples
In this example, we have enabled only the Content Editor in the
blogCollection.Copied to clipboardcollections_config: blog: _enabled_editors: - content{ "collections_config": { "blog": { "_enabled_editors": [ "content" ] } } }This key defines file-specific configuration without configuring a collection or modifying files.
This key has no default.
This key defines which inputs are available at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_inputswill default to any values configured in the CloudCannon configuration file.Show examplesHide examples
In this example, we have configured the
date_createdkey as a Date and Time Input, which will automatically populate when you create a file using this input. Editors cannot alter this input as the interface is disabled.Copied to clipboard_inputs: date_created: type: datetime label: Date of article creation comment: UTC +0 timezone context: open: false title: Help icon: help content: This date field will automatically populate when you create an article. hidden: false disabled: true instance_value: NOW cascade: true options: timezone: Etc/UTC{ "_inputs": { "date_created": { "type": "datetime", "label": "Date of article creation", "comment": "UTC +0 timezone", "context": { "open": false, "title": "Help", "icon": "help", "content": "This date field will automatically populate when you create an article." }, "hidden": false, "disabled": true, "instance_value": "NOW", "cascade": true, "options": { "timezone": "Etc/UTC" } } } }In this example, we have configured the
blog_tagskey as a Multiselect Input in theblogCollection.Copied to clipboardcollections_config: blog: _inputs: blog_tags: type: multiselect label: Blog type comment: Select a blog type context: open: false title: Help icon: help content: | Blog tags help our users filter articles by topic. options: values: - Opinion - Feature - Resource{ "collections_config": { "blog": { "_inputs": { "blog_tags": { "type": "multiselect", "label": "Blog type", "comment": "Select a blog type", "context": { "open": false, "title": "Help", "icon": "help", "content": "Blog tags help our users filter articles by topic.\n" }, "options": { "values": [ "Opinion", "Feature", "Resource" ] } } } } } }This key defines globs that filter which files CloudCannon should use for Input configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.inputs.yml.You can use this key anywhere you would use the
_inputskey in the configuration cascade.This key has no default.
Show examplesHide examples
In this example, we have several Input Configuration Files in the
.cloudcannon/inputs/folder, with each file containing multiple Input definitions. The value of the_inputs_from_globkey tells CloudCannon to only use theseo.cloudcannon.inputs.ymlandblog-details.cloudcannon.inputs.ymlfiles in that folder.Copied to clipboardcollections_config: posts: path: content/posts icon: event inputs_from_glob: - /.cloudcannon/inputs/seo.cloudcannon.inputs.yml - /.cloudcannon/inputs/blogDetails.cloudcannon.inputs.yml{ "collections_config": { "posts": { "path": "content/posts", "icon": "event", "inputs_from_glob": [ "/.cloudcannon/inputs/seo.cloudcannon.inputs.yml", "/.cloudcannon/inputs/blogDetails.cloudcannon.inputs.yml" ] } } }Copied to clipboardseo_title: type: text options: required: true max_length: 50 seo_description: type: textarea options: show_count: true required: true max_length: 125 seo_image: type: image options: path: uploads: images accepts_mime_types: - image/png - image/jpeg required: true pattern: (?i)\.(jpe?g|png)$ pattern_message: Please select a JPG or PNG image file{ "seo_title": { "type": "text", "options": { "required": true, "max_length": 50 } }, "seo_description": { "type": "textarea", "options": { "show_count": true, "required": true, "max_length": 125 } }, "seo_image": { "type": "image", "options": { "path": { "uploads": "images" }, "accepts_mime_types": [ "image/png", "image/jpeg" ], "required": true, "pattern": "(?i)\\.(jpe?g|png)$", "pattern_message": "Please select a JPG or PNG image file" } } }This key defines your markdown engine for parsing Markdown content into HTML and any configuration options for your engine.
Show examplesHide examples
In this example, we have configured CloudCannon to use the
commonmarkMarkdown engine with various options including attributes and attribute elements.Copied to clipboardmarkdown: engine: commonmark options: attributes: true attributes_elements: inline: none block: space right ul: below ol: below blockquote: below p: below img: below hr: below table: below li: none{ "markdown": { "engine": "commonmark", "options": { "attributes": true, "attributes_elements": { "inline": "none", "block": "space right", "ul": "below", "ol": "below", "blockquote": "below", "p": "below", "img": "below", "hr": "below", "table": "below", "li": "none" } } } }This key defines paths for your Rich Text editors or File inputs.
If undefined at higher levels of the configuration cascade,
pathswill default to any values configured in the CloudCannon configuration file.Show examplesHide examples
In this example, we have configured paths for the
blogCollection to set custom upload and static paths.Copied to clipboardcollections_config: blog: paths: uploads: /uploads/blog/ static: /assets/{ "collections_config": { "blog": { "paths": { "uploads": "/uploads/blog/", "static": "/assets/" } } } }This key defines the Pull Request templates available on your Site.
The value is an array of template objects. Each template object can contain optional
label,title,body,template_path, and_inputskeys.This key has no default.
Show examplesHide examples
In this example, we have two Pull Request templates in the
pull_request_templatesarray.Copied to clipboardpull_request_templates: - label: General changes _inputs: title: options: required: true body: type: markdown options: bold: true italic: true link: true format: p h1 h2 h3 - label: Delete content title: Delete content _inputs: title: options: disabled: true template_path: .github/templates/delete-content.md{ "pull_request_templates": [ { "label": "General changes", "_inputs": { "title": { "options": { "required": true } }, "body": { "type": "markdown", "options": { "bold": true, "italic": true, "link": true, "format": "p h1 h2 h3" } } } }, { "label": "Delete content", "title": "Delete content", "_inputs": { "title": { "options": { "disabled": true } } }, "template_path": ".github/templates/delete-content.md" } ] }This key defines defines fixed data sets to populate Select and Multiselect inputs at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_select_datawill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on Select and Multiselect inputs.
Show examplesHide examples
In this example, we have configured the
blog_tagsMultiselect input for theblogCollection.Copied to clipboardcollections_config: blog: _select_data: blog_topics: - Opinion - Feature - Resource{ "collections_config": { "blog": { "_select_data": { "blog_topics": [ "Opinion", "Feature", "Resource" ] } } } }A record of reusable values that can be referenced in snippet templates. Values are substituted using
{ ref: "key" }for direct replacement or{ spread_ref: "key" }for spreading arrays/objects. Common definition types include parser formats, argument models, select option lists, and simple string values like shortcode names.Show examplesHide examples
Define reusable values like shortcode names, argument models, and parser formats that can be referenced in snippet templates.
Copied to clipboard_snippets_definitions: shortcode_name: highlight content_key: content positional_args: - editor_key: language type: string - editor_key: linenos type: boolean optional: true default: false custom_format: root_pair_delimiter: - ' ' root_value_delimiter: '=' string_boundary: - '"' - '''' - '' allow_booleans: true allow_numbers: true{ "_snippets_definitions": { "shortcode_name": "highlight", "content_key": "content", "positional_args": [ { "editor_key": "language", "type": "string" }, { "editor_key": "linenos", "type": "boolean", "optional": true, "default": false } ], "custom_format": { "root_pair_delimiter": [ " " ], "root_value_delimiter": "=", "string_boundary": [ "\"", "'", "" ], "allow_booleans": true, "allow_numbers": true } } }Reference definitions in snippet templates using
{ ref: "key" }syntax. This allows you to reuse common configurations across multiple snippets.Copied to clipboard_snippets_definitions: shortcode_name: figure named_args: - editor_key: src type: string - editor_key: alt type: string optional: true _snippets_templates: my_shortcode_template: snippet: '{{< [[name]] [[args]] >}}' params: name: parser: literal options: literal: ref: shortcode_name args: parser: key_values options: models: ref: named_args _snippets: figure: template: my_shortcode_template definitions: shortcode_name: figure named_args: - editor_key: src type: string - editor_key: alt type: string{ "_snippets_definitions": { "shortcode_name": "figure", "named_args": [ { "editor_key": "src", "type": "string" }, { "editor_key": "alt", "type": "string", "optional": true } ] }, "_snippets_templates": { "my_shortcode_template": { "snippet": "{{< [[name]] [[args]] >}}", "params": { "name": { "parser": "literal", "options": { "literal": { "ref": "shortcode_name" } } }, "args": { "parser": "key_values", "options": { "models": { "ref": "named_args" } } } } } }, "_snippets": { "figure": { "template": "my_shortcode_template", "definitions": { "shortcode_name": "figure", "named_args": [ { "editor_key": "src", "type": "string" }, { "editor_key": "alt", "type": "string" } ] } } } }Define a list of select options for use in snippet inputs, such as a list of programming languages for a code highlighting snippet.
Copied to clipboard_snippets_definitions: languages: - name: JavaScript value: js - name: Python value: python - name: Ruby value: ruby - name: HTML value: html - name: CSS value: css{ "_snippets_definitions": { "languages": [ { "name": "JavaScript", "value": "js" }, { "name": "Python", "value": "python" }, { "name": "Ruby", "value": "ruby" }, { "name": "HTML", "value": "html" }, { "name": "CSS", "value": "css" } ] } }This key defines globs that filter which files CloudCannon should use for Snippet configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.snippets.yml.You can use this key anywhere you would use the
_snippetskey in the configuration cascade.This key has no default.
Show examplesHide examples
In this example, each Custom Snippet has its own Configuration File in the
.cloudcannon/snippets/folder. The value of the_snippets_from_globkey tells CloudCannon to use thecallout.cloudcannon.snippets.ymlfile in that folder.Copied to clipboard_snippets_imports: eleventy_liquid: true _snippets_from_glob: - /.cloudcannon/snippets/callout.cloudcannon.snippets.yml{ "_snippets_imports": { "eleventy_liquid": true }, "_snippets_from_glob": [ "/.cloudcannon/snippets/callout.cloudcannon.snippets.yml" ] }Copied to clipboardcallout: template: eleventy_liquid_include inline: false preview: text: Callout definitions: include_name: callout named_args: - source_key: type editor_key: label type: string - editor_key: message type: string _inputs: label: type: select options: values: - info - warning - error{ "callout": { "template": "eleventy_liquid_include", "inline": false, "preview": { "text": "Callout" }, "definitions": { "include_name": "callout", "named_args": [ { "source_key": "type", "editor_key": "label", "type": "string" }, { "editor_key": "message", "type": "string" } ] }, "_inputs": { "label": { "type": "select", "options": { "values": [ "info", "warning", "error" ] } } } } }This key defines snippet templates or libraries for your Site.
Some libraries are SSG specific while others work for most SSGs.
For more information, please read our documentation on Docusaurus Components, Eleventy Shortcodes, Hugo Shortcodes, MDX Components, or Python Markdown.
Show examplesHide examples
In this example, we have configured Hugo shortcode imports for the Site.
Copied to clipboard_snippets_imports: hugo: include: - figure - youtube{ "_snippets_imports": { "hugo": { "include": [ "figure", "youtube" ] } } }This key defines globs that filter which files CloudCannon should use for Collection configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.snippets-imports.yml.You can use this key anywhere you would use the
_snippets_importskey in the configuration cascade.This key has no default.
Show examplesHide examples
In this example, we have several Snippet Configuration Files in the
.cloudcannon/snippets/folder. The value of the_snippets_import_from_globkey tells CloudCannon all files in that folder that match the glob*.cloudcannon.snippets-import.yml.Copied to clipboard_snippets_imports_from_glob: - /.cloudcannon/snippets/*.cloudcannon.snippets-imports.yml{ "_snippets_imports_from_glob": [ "/.cloudcannon/snippets/*.cloudcannon.snippets-imports.yml" ] }Copied to clipboardmdx: true docusaurus_mdx: exclude: - docusaurus_mdx_truncate{ "mdx": true, "docusaurus_mdx": { "exclude": [ "docusaurus_mdx_truncate" ] } }This key defines extended options used when creating more complex custom snippets.
This key defines the base path for your source files, relative to the root folder of your repository.
Unless you use a nested folder as the source for your Site you can leave this key empty or set it to
/.For more information, please read our documentation on the Site source folder in your configuration file.
Show examplesHide examples
In this example, we have configured the source path to
srcso CloudCannon will look for source files in thesrcfolder.Copied to clipboardsource: src{ "source": "src" }This key defines the appearance and behavior of the Source Editor.
For more information, please read our documentation on the Source Editor.
Show examplesHide examples
In this example, we have configured the Source Editor with custom theme, tab size, and gutter settings.
Copied to clipboardsource_editor: theme: basic_dark tab_size: 2 show_gutter: true{ "source_editor": { "theme": "basic_dark", "tab_size": 2, "show_gutter": true } }This key defines which structures are available for Object inputs and Array inputs at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_structureswill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on structures.
Show examplesHide examples
In this example, we want to populate an Array input in the
blogCollection with Related Articles, including thename,description, andurlfields.Copied to clipboardcollections_config: blog: _structures: related_articles: style: select values: - preview: text: - key: name subtext: - key: url value: name: description: url:{ "collections_config": { "blog": { "_structures": { "related_articles": { "style": "select", "values": [ { "preview": { "text": [ { "key": "name" } ], "subtext": [ { "key": "url" } ] }, "value": { "name": null, "description": null, "url": null } } ] } } } } }In this example, we want to populate an Array input with Staff members, including the
name,job_description, andprofile_picturefields for all staff types, and theurlfield for Managers only.Copied to clipboard_structures: staff: style: modal hide_extra_inputs: false values: - value: _type: Employee name: job_description: profile_picture: preview: text: - key: name - Employee subtext: - key: job_description - Description of position image: - key: profile_picture icon: support_agent - value: _type: Manager name: job_description: profile_picture: url: preview: text: - key: name - Manager subtext: - key: job_description - Description of position image: - key: profile_picture icon: face{ "_structures": { "staff": { "style": "modal", "hide_extra_inputs": false, "values": [ { "value": { "_type": "Employee", "name": null, "job_description": null, "profile_picture": null }, "preview": { "text": [ { "key": "name" }, "Employee" ], "subtext": [ { "key": "job_description" }, "Description of position" ], "image": [ { "key": "profile_picture" } ], "icon": "support_agent" } }, { "value": { "_type": "Manager", "name": null, "job_description": null, "profile_picture": null, "url": null }, "preview": { "text": [ { "key": "name" }, "Manager" ], "subtext": [ { "key": "job_description" }, "Description of position" ], "image": [ { "key": "profile_picture" } ], "icon": "face" } } ] } } }This key defines globs that filter which files CloudCannon should use for Structure configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.structures.yml.You can use this key anywhere you would use the
_structureskey in the configuration cascade.Please see our documentation on values_from_glob for defining individual Structure values in a split Configuration File.
This key has no default.
Show examplesHide examples
In this example, we have several Structure Configuration Files in the
.cloudcannon/structures/folder. The value of the_structures_from_globkey tells CloudCannon to use thestaffMembers.cloudcannon.structures.ymlfile in that folder.Copied to clipboard_structures_from_glob: - /.cloudcannon/structures/staffMembers.cloudcannon.structures.yml{ "_structures_from_glob": [ "/.cloudcannon/structures/staffMembers.cloudcannon.structures.yml" ] }Copied to clipboardstaff: style: modal values: - label: Employee value: name: job_description: profile_picture: - label: Manager value: name: job_description: profile_picture: url:{ "staff": { "style": "modal", "values": [ { "label": "Employee", "value": { "name": null, "job_description": null, "profile_picture": null } }, { "label": "Manager", "value": { "name": null, "job_description": null, "profile_picture": null, "url": null } } ] } }This key defines the timezone for your Site.
Value must be in IANA timezone format.
For more information, please read our documentation on Date and Time inputs.
Allowed values:
Africa/AbidjanAfrica/AccraAfrica/Addis_AbabaAfrica/AlgiersAfrica/AsmaraAfrica/AsmeraAfrica/BamakoAfrica/BanguiAfrica/BanjulAfrica/Bissauand 585 more.This key defines the commit template to use when pulling changes from the upstream repository.
An upstream commit message template can contain plain text and placeholders. Placeholders insert data related to the commit and use
[ ]brackets. CloudCannon supports the following commit placeholders:[branch]— the name of the current branch.[publish_branch]— the name of the Publish Branch from which you merge upstream changes.[author]— the email address of the person responsible for the upstream merge.[date]— the date of the upstream merge in the format "Tue Nov 28 2023 21:46:17 GMT+0000".
Show examplesHide examples
In this example, we have configured a commit template with placeholders for upstream pulls.
Copied to clipboardupstream_commit_template: Merge branch [publish_branch] into develop of [branch] by [author] at [date]{ "upstream_commit_template": "Merge branch [publish_branch] into develop of [branch] by [author] at [date]" }