A list is an array of values that can be either strings or nested objects.
Options:
- default (array): A list of default values.
- of (NestedType): A nested document type definition.
Example:
defineDocumentType(() => ({
// ...
fields: {
tags: {
type: "list",
of: { type: "string" }
}
}
}));
The default list type expects an array of strings, like this:
---
tags:
- My First Tag
- Another Tag
---