This key defines a parser configuration that parses repeating pairs of keys and values.
Useful for most SSG snippets that take properties.
Can be configured to handle most syntax forms of key value pairs.
Appears in
└── Snippet
└── params
└── *
└── Key Value List Parser ConfigurationType
Object
Properties
This key defines configuration options for key-value list parser configurations.
The value is an object that can contain models, format, and style properties. These options control how multiple key-value pairs are parsed and validated.
Appears in: Key Value List Parser Configuration.
Show examplesHide examples
In this example, we have configured key-value list parser options with models.
_snippets:
example:
snippet: <<example key1=value1 key2=value2>>
params:
params:
parser: key_values
options:
models:
key1:
editor_key: value1_input
key2:
editor_key: value2_input{
"_snippets": {
"example": {
"snippet": "<<example key1=value1 key2=value2>>",
"params": {
"params": {
"parser": "key_values",
"options": {
"models": {
"key1": {
"editor_key": "value1_input"
},
"key2": {
"editor_key": "value2_input"
}
}
}
}
}
}
}
}This key defines the parser type for key-value list parser configurations.
The value must be key_values. This specifies that the parameter uses the key-value list parser, which parses multiple key-value pairs.
Appears in: Key Value List Parser Configuration.
Show examplesHide examples
In this example, we have configured a key-value list parser for a snippet parameter.
_snippets:
example:
snippet: <<example key1=value1 key2=value2>>
params:
params:
parser: key_values
options:
models:
key1:
editor_key: value1_input
key2:
editor_key: value2_input{
"_snippets": {
"example": {
"snippet": "<<example key1=value1 key2=value2>>",
"params": {
"params": {
"parser": "key_values",
"options": {
"models": {
"key1": {
"editor_key": "value1_input"
},
"key2": {
"editor_key": "value2_input"
}
}
}
}
}
}
}
}Examples
In this example, we have configured a key-value list parser to parse repeating pairs of keys and values in Liquid syntax.
{% include "image.html" image: "tree.png" alt: "Image of a tree" %}
└──────────────────────────────────────┘In this example, we have configured a key-value list parser to parse repeating pairs of keys and values in Markdown syntax.
<Link href="/about/" new_tab={true}/>
└───────────────────────────┘