Basically, allow me to define a union of types that a field can be.
Simple example would be string | string[]. Config proposal:
// ...
author: {
type: `union`,
of: [
{
type: `string`
},
{
type: `list`,
of: {
type: `string`
}
}
]
},
This would permit the following frontmatter:
author: Foo Bar
# or
author:
- Foo Bar
- Baz Qux
If this is already possible with the existing field types, please add examples to the documentation which demonstrate how to do this, as it's not readily apparent how this can be done.
Basically, allow me to define a union of types that a field can be.
Simple example would be
string | string[]. Config proposal:This would permit the following frontmatter:
If this is already possible with the existing field types, please add examples to the documentation which demonstrate how to do this, as it's not readily apparent how this can be done.