☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

Glob Array

Table of contents

Description:

This key represents an array format for the collections_config.*.glob key.

The value is an array of glob pattern strings. Each string specifies a file path pattern relative to the Collection path. Globs can be positive (e.g., *.yml) or negative (e.g., !**/*.json).

Files are included in a Collection if they match any positive globs and do not match any negative globs.

Appears in:
└── collections_config
    └── *
        └── glob
            └── Glob Array
Type:
Array<glob(glob-array)[*]>
Items:
[*]string#

This key represents an individual glob pattern string in the collections_config.*.glob array.

The value is a string that specifies a file path pattern relative to the Collection path. Globs can be positive (e.g., *.yml) or negative (e.g., !**/*.json).

Show examplesHide examples

In this example, the data Collection uses a negative glob pattern to exclude the secret.yml file from the Collection browser.

Copied to clipboard
collections_config:
  data:
    path: data
    glob:
      - '!secret.yml'
{
  "collections_config": {
    "data": {
      "path": "data",
      "glob": [
        "!secret.yml"
      ]
    }
  }
}
Examples:

In this example, the data Collection uses an array of glob patterns to show only .yml files, except for the secret.yml file.

Copied to clipboard
collections_config:
  data:
    path: data
    glob:
      - '**/*.yml'
      - '!secret.yml'
{
  "collections_config": {
    "data": {
      "path": "data",
      "glob": [
        "**/*.yml",
        "!secret.yml"
      ]
    }
  }
}
Open in a new tab