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
└── *
└── globTypes
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: *.glob.
Show examplesHide examples
In this example, the data Collection uses an array of glob patterns to show only .yml files, except for the secret.yml file.
collections_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.*.glob key.
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.
Appears in: *.glob.
Show examplesHide examples
In this example, the data Collection uses a single glob pattern to show only .yml files in the data folder or any nested folders.
collections_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 data folder except for the secret.yml file.
collections_config:
data:
path: data
glob:
- '!secret.yml'{
"collections_config": {
"data": {
"path": "data",
"glob": [
"!secret.yml"
]
}
}
}In this example, the Collection browser will show only .yml files in the data folder or any nested folders.
collections_config:
data:
path: data
glob: '**/*.yml'{
"collections_config": {
"data": {
"path": "data",
"glob": "**/*.yml"
}
}
}In this example, the Collection browser will show only .yml files in the data folder, except for the secret.yml file.
collections_config:
data:
path: data
glob:
- '**/*.yml'
- '!secret.yml'{
"collections_config": {
"data": {
"path": "data",
"glob": [
"**/*.yml",
"!secret.yml"
]
}
}
}