- Description:
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 ofsource) and must end in the file extension.cloudcannon.schemas.yml.You can use this key anywhere you would use the
schemaskey.This key has no default.
- Appears in:
└── collections_config └── * └── schemas_from_glob- Type:
Array<schemas_from_glob[*]>- Items:
This key represents an individual glob pattern string in the
collections_config.*.schemas_from_globarray.The value is a string that specifies a file path pattern relative to the root of your repository. The path must end in the file extension
.cloudcannon.schemas.yml.Show examplesHide examples
In this example, we have several Schema Configuration Files in the
.cloudcannon/schemas/folder. The value of theschemas_from_globkey tells CloudCannon to use all files in that folder that match the glob*.cloudcannon.schemas.ymlexcept forpages.cloudcannon.schemas.ymldue to the negative glob.Copied to clipboardposts: path: content/posts icon: event schemas_from_glob: - /.cloudcannon/schemas/*.cloudcannon.schemas.yml - '!/.cloudcannon/schemas/pages.cloudcannon.schemas.yml'{ "posts": { "path": "content/posts", "icon": "event", "schemas_from_glob": [ "/.cloudcannon/schemas/*.cloudcannon.schemas.yml", "!/.cloudcannon/schemas/pages.cloudcannon.schemas.yml" ] } }- Examples:
In this example, we have several Schemas Configuration Files in the
.cloudcannon/schemas/folder. The value of theschemas_from_globkey tells CloudCannon to use all files in that folder that match the glob*.cloudcannon.schemas.ymlexcept forpages.cloudcannon.schemas.ymldue to the negative glob.Copied to clipboardposts: path: content/posts icon: event schemas_from_glob: - /.cloudcannon/schemas/*.cloudcannon.schemas.yml - '!/.cloudcannon/schemas/pages.cloudcannon.schemas.yml'{ "posts": { "path": "content/posts", "icon": "event", "schemas_from_glob": [ "/.cloudcannon/schemas/*.cloudcannon.schemas.yml", "!/.cloudcannon/schemas/pages.cloudcannon.schemas.yml" ] } }