Split your Configuration File

Last modified: November 26th, 2025

Permissions required

Members of the Owners, Developers, or Technical Editors Default Permission Groups, or Custom Permission Groups with the site:source-editor:write and site:file:write permissions, can edit your CloudCannon Configuration File. You can limit permission to specific files using file globs.

You can split your CloudCannon Configuration File into multiple files for easier maintenance. For more information, please read our documentation on why you might split your Configuration File, and best practices for splitting your Configuration File.

These instructions assume your Site uses Unified Configuration.

To split your CloudCannon Configuration File:

  1. Navigate to your File Browser and open your CloudCannon Configuration File in the Source Editor, or open it in your local development environment.
  2. Identify the configuration key you want to split out into a new file (e.g., a Collection under collections_config).
  3. Copy all the configuration content under the key to a new file with the appropriate .cloudcannon.[].yml file extension.
  4. Reference the location of the new Configuration File (relative to the root of your repository) in the original Configuration File using the appropriate *_from_glob key. If the original Configuration File is not your main CloudCannon Configuration File (i.e., cloudcannon.config.yml), ensure that every Configuration File ultimately connects back to your main Configuration File using *_from_glob keys.
  5. Save the changes to your Site.

Whenever you load your Site or update a Configuration File, CloudCannon will merge your configuration and apply it to your Site.

Configuration keys#

CloudCannon allows you to split the specific configuration keys into separate Configuration Files. Here is an example of two Configuration Files using some of the most commonly used keys for splitting configuration.

cloudcannon.config.yaml
copied
source: /
collections_config_from_glob:
  - /.cloudcannon/collections/*.cloudcannon.collections.yml
_inputs_from_glob:
  - /.cloudcannon/inputs/*.cloudcannon.inputs.yml
_structures_from_glob:
  - /.cloudcannon/structures/*.cloudcannon.structures.yml
cloudcannon.config.json
copied
{
  "source": "/",
  "collections_config_from_glob": [
    "/.cloudcannon/collections/*.cloudcannon.collections.yml"
  ],
  "_inputs_from_glob": [
    "/.cloudcannon/inputs/*.cloudcannon.inputs.yml"
  ],
  "_structures_from_glob": [
    "/.cloudcannon/structures/*.cloudcannon.structures.yml"
  ]
}
/.cloudcannon/collections/posts.cloudcannon.collections.yaml
copied
posts:
  path: src/content/
  schemas_from_glob:
    - /.cloudcannon/schemas/blogPost.cloudcannon.schemas.yml
    - /.cloudcannon/schemas/companyAnnouncement.cloudcannon.schemas.yml
    - /.cloudcannon/schemas/caseStudy.cloudcannon.schemas.yml
/.cloudcannon/collections/posts.cloudcannon.collections.json
copied
{
  "posts": {
    "path": "src/content/",
    "schemas_from_glob": [
      "/.cloudcannon/schemas/blogPost.cloudcannon.schemas.yml",
      "/.cloudcannon/schemas/companyAnnouncement.cloudcannon.schemas.yml",
      "/.cloudcannon/schemas/caseStudy.cloudcannon.schemas.yml"
    ]
  }
}

For a complete list of configuration keys available for the CloudCannon Configuration File, please read our Configuration File reference documentation.

These keys configure which files CloudCannon should use for Site configuration.

collections_config_from_glob — Array of Strings#

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 of source) and must end in the file extension .cloudcannon.collections.yml. You can use this key anywhere you would use the collections_config key.

This key has no default.

Show exampleHide example

In this example, each Collection has its own Configuration File in the .cloudcannon/collections/ folder. The value of the collections_config_from_glob key tells CloudCannon to use all files in that folder that match the glob *.cloudcannon.collections.yml.

cloudcannon.config.yaml
copied
collections_config_from_glob:
  - /.cloudcannon/collections/*.cloudcannon.collections.yml
cloudcannon.config.json
copied
{
  "collections_config_from_glob": [
    "/.cloudcannon/collections/*.cloudcannon.collections.yml"
  ]
}
/.cloudcannon/collections/posts.cloudcannon.collections.yaml
copied
posts:
  path: content/posts
  icon: event
/.cloudcannon/collections/posts.cloudcannon.collections.json
copied
{
  "posts": {
    "path": "content/posts",
    "icon": "event"
  }
}
schemas_from_glob — Array of Strings#

This key defines globs that filter which files CloudCannon should use for Schema configuration. Values in this array are relative to the root of your repository (i.e., /, not the value of source) and must end in the file extension .cloudcannon.schemas.yml. You can use this key anywhere you would use the schemas key.

This key has no default.

Show exampleHide example

In this example, we have several Schemas Configuration Files in the .cloudcannon/schemas/ folder. The value of the schemas_from_glob key tells CloudCannon to use all files in that folder that match the glob *.cloudcannon.schemas.yml except for pages.cloudcannon.schemas.yml due to the negative glob.

/.cloudcannon/collections/posts.cloudcannon.collections.yaml
copied
posts:
  path: content/posts
  icon: event
  schemas_from_glob:
    - /.cloudcannon/schemas/*.cloudcannon.schemas.yml
    - '!/.cloudcannon/schemas/pages.cloudcannon.schemas.yml'
/.cloudcannon/collections/posts.cloudcannon.collections.json
copied
{
  "posts": {
    "path": "content/posts",
    "icon": "event",
    "schemas_from_glob": [
      "/.cloudcannon/schemas/*.cloudcannon.schemas.yml",
      "!/.cloudcannon/schemas/pages.cloudcannon.schemas.yml"
    ]
  }
}
_inputs_from_glob — Array of Strings#

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 of source) and must end in the file extension .cloudcannon.inputs.yml. You can use this key anywhere you would use the _inputs key in the configuration cascade.

This key has no default.

Show exampleHide example

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_glob key tells CloudCannon to only use the seo.cloudcannon.inputs.yml and blog-details.cloudcannon.inputs.yml files in that folder.

cloudcannon.config.yaml
copied
collections_config:
  posts:
    path: content/posts
    icon: event
    inputs_from_glob:
      - /.cloudcannon/inputs/seo.cloudcannon.inputs.yml
      - /.cloudcannon/inputs/blogDetails.cloudcannon.inputs.yml
cloudcannon.config.json
copied
{
  "collections_config": {
    "posts": {
      "path": "content/posts",
      "icon": "event",
      "inputs_from_glob": [
        "/.cloudcannon/inputs/seo.cloudcannon.inputs.yml",
        "/.cloudcannon/inputs/blogDetails.cloudcannon.inputs.yml"
      ]
    }
  }
}
/.cloudcannon/inputs/seo.cloudcannon.inputs.yaml
copied
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
/.cloudcannon/inputs/seo.cloudcannon.inputs.json
copied
{
  "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"
    }
  }
}
_structures_from_glob — Array of Strings#

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 of source) and must end in the file extension .cloudcannon.structures.yml. You can use this key anywhere you would use the _structures key 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 exampleHide example

In this example, we have several Structure Configuration Files in the .cloudcannon/structures/ folder. The value of the _structures_from_glob key tells CloudCannon to use the staffMembers.cloudcannon.structures.yml file in that folder.

cloudcannon.config.yaml
copied
_structures_from_glob:
  - /.cloudcannon/structures/staffMembers.cloudcannon.structures.yml
cloudcannon.config.json
copied
{
  "_structures_from_glob": [
    "/.cloudcannon/structures/staffMembers.cloudcannon.structures.yml"
  ]
}
/.cloudcannon/structures/staffMembers.cloudcannon.structures.yaml
copied
staff:
  style: modal
  values:
    - label: Employee
      value:
        name: 
        job_description: 
        profile_picture: 
    - label: Manager
      value:
        name: 
        job_description: 
        profile_picture: 
        url: 
/.cloudcannon/structures/staffMembers.cloudcannon.structures.json
copied
{
  "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
        }
      }
    ]
  }
}
values_from_glob — Array of Strings#

This key defines globs that filter which files CloudCannon should use for Structure value configuration. Values in this array are relative to the root of your repository (i.e., /, not the value of source) and must end in the file extension .cloudcannon.structure-value.yml (note the singular form of "value"). You can use this key anywhere you would use the _structures.*.values key. Please see our documentation on structures_from_glob for defining a Structure in a split Configuration File.

This key has no default.

Show exampleHide example

In this example, the staff Array Input uses inline Structure values from the main Configuration File and also references another value from the boardMember.cloudcannon.structure_value.yml in the /.cloudcannon/structures/ folder.

cloudcannon.config.yaml
copied
_inputs:
  staff:
    type: array
    options:
      structures: 
      values_from_glob: /.cloudcannon/structures/boardMember.cloudcannon.structure-value.yml
      values:
        - label: Employee
          value:
            name: 
            title: 
            profile_picture: 
        - label: Manager
          value:
            name: 
            title: 
            profile_picture: 
            url: 
cloudcannon.config.json
copied
{
  "_inputs": {
    "staff": {
      "type": "array",
      "options": {
        "structures": null,
        "values_from_glob": "/.cloudcannon/structures/boardMember.cloudcannon.structure-value.yml",
        "values": [
          {
            "label": "Employee",
            "value": {
              "name": null,
              "title": null,
              "profile_picture": null
            }
          },
          {
            "label": "Manager",
            "value": {
              "name": null,
              "title": null,
              "profile_picture": null,
              "url": null
            }
          }
        ]
      }
    }
  }
}
/.cloudcannon/structures/boardMember.cloudcannon.structure-value.yaml
copied
label: Board
value:
  name: 
  title: 
  profile_picture: 
  url: 
  description: 
/.cloudcannon/structures/boardMember.cloudcannon.structure-value.json
copied
{
  "label": "Board",
  "value": {
    "name": null,
    "title": null,
    "profile_picture": null,
    "url": null,
    "description": null
  }
}
_snippets_from_glob — Array of Strings#

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 of source) and must end in the file extension .cloudcannon.snippets.yml. You can use this key anywhere you would use the _snippets key in the configuration cascade.

This key has no default.

Show exampleHide example

In this example, each Custom Snippet has its own Configuration File in the .cloudcannon/snippets/ folder. The value of the _snippets_from_glob key tells CloudCannon to use the callout.cloudcannon.snippets.yml file in that folder.

cloudcannon.config.yaml
copied
_snippets_imports:
  eleventy_liquid: true
_snippets_from_glob:
  - /.cloudcannon/snippets/callout.cloudcannon.snippets.yml
cloudcannon.config.json
copied
{
  "_snippets_imports": {
    "eleventy_liquid": true
  },
  "_snippets_from_glob": [
    "/.cloudcannon/snippets/callout.cloudcannon.snippets.yml"
  ]
}
/.cloudcannon/snippets/callout.cloudcannon.snippets.yaml
copied
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
/.cloudcannon/snippets/callout.cloudcannon.snippets.json
copied
{
  "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"
          ]
        }
      }
    }
  }
}
_snippets_imports_from_glob — Array of Strings#

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 of source) and must end in the file extension .cloudcannon.snippets-imports.yml. You can use this key anywhere you would use the _snippets_imports key in the configuration cascade.

This key has no default.

Show exampleHide example

In this example, we have several Snippet Configuration Files in the .cloudcannon/snippets/ folder. The value of the _snippets_import_from_glob key tells CloudCannon all files in that folder that match the glob *.cloudcannon.snippets-import.yml.

cloudcannon.config.yaml
copied
_snippets_imports_from_glob:
  - /.cloudcannon/snippets/*.cloudcannon.snippets-imports.yml
cloudcannon.config.json
copied
{
  "_snippets_imports_from_glob": [
    "/.cloudcannon/snippets/*.cloudcannon.snippets-imports.yml"
  ]
}
/.cloudcannon/snippets/docusaurusSnippets.cloudcannon.snippets-imports.yaml
copied
mdx: true
docusaurus_mdx:
  exclude:
    - docusaurus_mdx_truncate
/.cloudcannon/snippets/docusaurusSnippets.cloudcannon.snippets-imports.json
copied
{
  "mdx": true,
  "docusaurus_mdx": {
    "exclude": [
      "docusaurus_mdx_truncate"
    ]
  }
}
_editables_from_glob — Array of Strings#

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 of source) and must end in the file extension .cloudcannon.editables.yml. You can use this key anywhere you would use the _editables key in the configuration cascade.

This key has no default.

Show exampleHide example

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_glob key tells CloudCannon all files in that folder that match the glob *.cloudcannon.editables.yml.

cloudcannon.config.yaml
copied
_editables_from_glob:
  - /.cloudcannon/editables/*.cloudcannon.editables.yml
cloudcannon.config.json
copied
{
  "_editables_from_glob": [
    "/.cloudcannon/editables/*.cloudcannon.editables.yml"
  ]
}
/.cloudcannon/editables/textEditableRegions.cloudcannon.editables.yaml
copied
text:
  bold: true
  italic: true
  underline: true
block:
  format: p h3
  undo: true
  redo: true
link:
  bold: true
  italic: true
  underline: true
/.cloudcannon/editables/textEditableRegions.cloudcannon.editables.json
copied
{
  "text": {
    "bold": true,
    "italic": true,
    "underline": true
  },
  "block": {
    "format": "p h3",
    "undo": true,
    "redo": true
  },
  "link": {
    "bold": true,
    "italic": true,
    "underline": true
  }
}

Common errors#

If you have any questions about configuring your Site on CloudCannon, don't hesitate to contact our friendly support team.

Site configuration is not loading#

  • Check that the glob pattern in your *_from_glob key correctly matches the name of your Configuration File.
  • Check that the value of your *_from_glob key references the correct file extension (e.g., collections_config_from_glob must reference a file with the .cloudcannon.collections.yml extension).
  • Ensure that the value of *_from_glob is relative to the root repository, not the source directory.
  • Verify that your Site uses Unified Configuration.

One configuration is unexpectedly overwriting another#

  • Check where you have defined you configuration. If you have defined a configuration key multiple times at the same level of the configuration cascade, CloudCannon will preferentially use the configuration defined in files later in the import order (i.e., inline configuration first, followed by configuration from other files in Unicode order).

Array items are missing#

  • Check that the glob pattern in your *_from_glob key correctly matches the name of your Configuration File.
  • Array items referenced in another Configuration File using a *_from_glob key are appended to any array items defined in your main Configuration File. Check all array items are present in the files referenced by your values_from_glob key.

Open in a new tab