This key defines metadata entries displayed on Cards in the Collection browser, Structures, and Snippets.
The value is an array of metadata entry objects. Each metadata entry can contain text, image, icon, icon_color, and icon_background_color properties.
Metadata entries are typically used to display additional information about a card, such as publication dates, URLs, or other contextual data.
Appears in
Type
Array<metadata[*]>
Items
This key represents an individual metadata entry object in the preview.metadata array.
The value is an object that can contain text, image, icon, icon_color, and icon_background_color properties. Each metadata entry is displayed on Cards in the Collection browser, Structures, and Snippets.
Appears in: metadata.
Show examplesHide examples
In this example, we have configured a metadata entry for Cards in the blog Collection to display the URL using a template.
collections_config:
blog:
preview:
metadata:
- template: '[url]'{
"collections_config": {
"blog": {
"preview": {
"metadata": [
{
"template": "[url]"
}
]
}
}
}
}Examples
In this example, we have configured two metadata entries for Cards in the blog Collection to display the URL and publication date.
collections_config:
blog:
preview:
metadata:
- text:
- key: url
- icon: event
icon_color: light-blue
text:
- template: Published on {date|date_long}{
"collections_config": {
"blog": {
"preview": {
"metadata": [
{
"text": [
{
"key": "url"
}
]
},
{
"icon": "event",
"icon_color": "light-blue",
"text": [
{
"template": "Published on {date|date_long}"
}
]
}
]
}
}
}
}