- Description:
This key defines globs which filter the files visible in the Collection browser for a given Collection.
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.
If you do not define any positive globs, CloudCannon will include all non-developer files in a Collection unless they match a negative glob.
Defining a negative glob for a Collection does not remove a file from the associated Collection folder in your Git repository.
Similarly, defining a positive glob for a file in a folder outside your Collection path does not move the file.
- Appears in:
└── collections_config └── * └── glob- Types:
This key represents an array format for the
collections_config.*.globkey.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.
Show examplesHide examples
In this example, the
dataCollection uses an array of glob patterns to show only.ymlfiles, except for thesecret.ymlfile.Copied to clipboardcollections_config: data: path: data glob: - '**/*.yml' - '!secret.yml'{ "collections_config": { "data": { "path": "data", "glob": [ "**/*.yml", "!secret.yml" ] } } }This key represents a single glob pattern string format for the
collections_config.*.globkey.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).Files are included in a Collection if they match any positive globs and do not match any negative globs.
Show examplesHide examples
In this example, the
dataCollection uses a single glob pattern to show only.ymlfiles in thedatafolder or any nested folders.Copied to clipboardcollections_config: data: path: data glob: '**/*.yml'{ "collections_config": { "data": { "path": "data", "glob": "**/*.yml" } } }- Examples:
In this example, the Collection browser will show all files in the
datafolder except for thesecret.ymlfile.Copied to clipboardcollections_config: data: path: data glob: - '!secret.yml'{ "collections_config": { "data": { "path": "data", "glob": [ "!secret.yml" ] } } }In this example, the Collection browser will show only
.ymlfiles in thedatafolder or any nested folders.Copied to clipboardcollections_config: data: path: data glob: '**/*.yml'{ "collections_config": { "data": { "path": "data", "glob": "**/*.yml" } } }In this example, the Collection browser will show only
.ymlfiles in thedatafolder, except for thesecret.ymlfile.Copied to clipboardcollections_config: data: path: data glob: - '**/*.yml' - '!secret.yml'{ "collections_config": { "data": { "path": "data", "glob": [ "**/*.yml", "!secret.yml" ] } } }