Define the editor schema for collections and files.

fields defines the editor schema.

Keys

These keys apply to all field types unless noted otherwise.

Key Description
name * Field key used in stored data.
label UI label for the field.
type * Field type.
required Marks the field as required.
hidden Hides the field from the editor.
readonly Shows the field value but prevents editing it. Inherited by nested object, block, and list fields.
description Helper text shown below the field.
options Field-specific options. See each field page for details.

*: Required

body is a special key

For frontmatter formats, body maps to the file content below the frontmatter.

All other fields stay in frontmatter.

fields:
  - name: title
    type: string
  - name: body
    type: rich-text

Field types

Type Description
block Multiple object shapes in one list.
boolean True/false toggle.
code Code editor with syntax highlighting.
date Date or date-time input.
file File picker or uploader.
image Image picker or uploader.
number Numeric input.
object Nested group of fields.
reference Link to another collection.
rich-text Rich text editor.
select Fixed local options.
string Single-line text input.
text Multi-line plain text input.
uuid UUID v4 field.

Examples

Frontmatter with body content

fields:
  - name: title
    type: string
  - name: published
    type: boolean
  - name: body
    type: rich-text

Nested object field

fields:
  - name: author
    type: object
    fields:
      - name: name
        type: string
      - name: email
        type: string