- Description:
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 ofsource) and must end in the file extension.cloudcannon.snippets.yml.You can use this key anywhere you would use the
_snippetskey in the configuration cascade.This key has no default.
- Type:
Array<_snippets_from_glob[*]>- Items:
This key represents an individual glob pattern string in the
_snippets_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.snippets.yml.Appears in:
_snippets_from_glob.Show examplesHide examples
In this example, each Custom Snippet has its own Configuration File in the
.cloudcannon/snippets/folder. The value of the_snippets_from_globkey tells CloudCannon to use thecallout.cloudcannon.snippets.ymlfile in that folder.Copied to clipboard_snippets_imports: eleventy_liquid: true _snippets_from_glob: - /.cloudcannon/snippets/callout.cloudcannon.snippets.yml{ "_snippets_imports": { "eleventy_liquid": true }, "_snippets_from_glob": [ "/.cloudcannon/snippets/callout.cloudcannon.snippets.yml" ] }- Examples:
In this example, each Custom Snippet has its own Configuration File in the
.cloudcannon/snippets/folder. The value of the_snippets_from_globkey tells CloudCannon to use thecallout.cloudcannon.snippets.ymlfile in that folder.Copied to clipboard_snippets_imports: eleventy_liquid: true _snippets_from_glob: - /.cloudcannon/snippets/callout.cloudcannon.snippets.yml{ "_snippets_imports": { "eleventy_liquid": true }, "_snippets_from_glob": [ "/.cloudcannon/snippets/callout.cloudcannon.snippets.yml" ] }- Copied to clipboard
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{ "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" ] } } } } }