Schema reference

Field types

Every field type the schema can declare, with its knobs, defaults, and the YAML it produces on disk.

Not verified yet

The CMS supports 16 field types. Every field has the same set of common keys (FieldBase) plus type-specific extras. This page is exhaustive — use the table of contents on the right to jump to the type you need.

Common to every field

- key: heading # frontmatter key — where the value lands
  type: text # discriminator — selects the field implementation
  label: Heading # author-facing label, shown above the input
  description: … # optional helper text, shown under the field
  required: true # validator enforces non-empty
  hidden: true # never rendered (value seeded from `default`)
  default: 'Welcome' # initial value for new entries
  visibleIf: # show only when the condition is true
    field: tier
    op: eq
    value: pro
  whenHidden: keep # keep | drop — what to do with stored value
  customValidators: [] # plugin validators, see Validation
  translatable: false # keep this field's text as it is in every language
  role: seoTitle # what the field means to the site, see Field roles
  computed: # auto-derived value, see Computed fields
    from: title
    transform: slug
    mode: auto
KeyEffect
keyThe frontmatter key the value lands at. Must be unique inside its group.
typeType discriminator. The remaining knobs are type-specific.
labelAuthor-facing label. Required on every field (no fallback to key).
descriptionHelper text rendered under the input.
requiredReject save when empty. See Validation → required.
hiddenNever rendered. Value still seeded from default so saves don't strip it.
defaultInitial value (literals only; no expressions).
visibleIfHide unless the condition evaluates true. See Conditional rendering.
whenHiddenkeep (default) preserves the stored value when hidden; drop purges on save.
customValidatorsPlugin validators applied in addition to the built-ins.
computedAuto-fill the value from another field. See Computed fields.
translatableWhether the field's text is translated when a page gets a language version. See below.
roleWhat the field means to the site: seoTitle, seoDescription, shareImage, noindex, canonical, draft, alt or none. See Field roles.

translatable belongs to language versions. Left out, the default follows the type: text, paragraph and richtext fields are translated; every other type is carried over as it is. Not translated either: the field that links the versions, computed and hidden fields, a text field with a regex (an id, an icon name), and a slug (the new page gets its own). Set translatable: false on text that must stay the same in every language (a product code, a brand name), or true on a text field that would not be translated by default. On a group or a list, false covers every field inside that does not say translatable itself, and so does hidden; true there only undoes a false further out, and the rules above still apply to the fields inside. It is read when a page is translated.

text

Single-line text input.

- key: title
  type: text
  label: Title
  default: ''
  minLength: 5
  maxLength: 80
  recommendedLength: { from: 30, to: 60 }
  regex: '^[A-Z]'
  regexMessage: 'Start with a capital.'
  minLengthMessage: 'Make it at least 5 characters.'
KnobEffect
minLengthHard lower bound (chars). Violations surface in the Health panel.
maxLengthHard upper bound.
recommendedLengthSoft sweet-spot range. The counter turns green inside, amber outside.
regexJavaScript-flavoured regex source (no surrounding slashes).
regexMessageCustom error text for regex.
*Message variantsOverride the default error text for required / minLength / maxLength.
variablesfalse hides the {{variable}} paster + hints on this field (also available on paragraph and link).

Use text for short single-line values (titles, slugs, IDs). For multi-line plain text use paragraph. For rich formatting use richtext.

paragraph

Multi-line plain-text input. Same length / regex knobs as text.

- key: description
  type: paragraph
  label: Description
  rows: 3
  recommendedLength: { from: 50, to: 160 }
KnobEffect
rowsInitial visible row count (auto-grows).

Use paragraph for SEO descriptions, summaries, social-card copy — anywhere the content is plain text but multi-line.

richtext

Tiptap-based rich-text editor. Every toolbar button is opt-in through options: a flag that is absent or false removes the button and its keyboard shortcut, so an author cannot sneak italics into a field that only allows bold.

- key: body
  type: richtext
  label: Body
  format: markdown
  options:
    bold: true
    italic: true
    link: true
    headings: [2, 3]
    bulletList: true
    orderedList: true
    blockquote: true
KnobValuesEffect
formatmarkdown (default), htmlStorage format the value round-trips through.
optionsmap of flagsbold, italic, strike, code, link, bulletList, orderedList, blockquote, codeBlock, horizontalRule (booleans), headings (allowed levels, e.g. [2, 3]), singleLine (one line, Enter suppressed), placeholder. Omit for the full toolbar.

format: markdown writes the value as Markdown — typically the .md file's body. format: html writes HTML. Pick markdown when your build pipeline already runs the file through a Markdown processor; pick html when you want the CMS to do the rendering and you're storing pre-rendered output.

number

Numeric input. Integer when step: 1, decimals otherwise.

- key: seats
  type: number
  label: Seats
  min: 1
  max: 100
  step: 1
  default: 1
KnobEffect
minReject save when below.
maxReject save when above.
stepIncrement (also drives integer vs decimal).

For a sliding-control UI prefer range. For a set of allowed values use select.

boolean

Toggle. The simplest field type.

- key: featured
  type: boolean
  label: Featured
  default: false

No type-specific knobs beyond default.

date

Date picker. Stores as ISO-8601 yyyy-mm-dd.

- key: publishedAt
  type: date
  label: Published at
  default: ''

No time component. Use a text field with a regex if you need ISO datetimes or other formats.

color

Colour picker.

- key: accent
  type: color
  label: Accent colour
  format: hex
  default: '#3b33c7'
KnobValuesEffect
formathex (default), oklchhex writes #rrggbb and renders the native colour picker; oklch writes oklch(...) — useful when your theme runs through Tailwind v4 / OKLch — but renders a plain text input for now (no picker).

range

Slider with min / max / step.

- key: spacing
  type: range
  label: Spacing
  min: 0
  max: 100
  step: 5
  default: 50

Same min / max / step semantics as number but renders as a slider control. Good fit for opacity, spacing scale, or any value the author tweaks visually.

multichoice

Multi-select with min / max constraints. Value is string[].

- key: tags
  type: multichoice
  label: Tags
  options:
    - travel
    - food
    - sport
  min: 1
  max: 3
KnobEffect
optionsThe allowed values. Strings or {value, label, description} objects.
minReject save when fewer than this many are selected.
maxReject save when more than this many are selected.

Multichoice arrays diff as + added, − removed pills in the Version history — the schema-aware renderer recognises the set semantics.

A hyperlink. The file holds one plain string, the editor shows a type selector on the left so authors never type an address by hand:

KindWhat the author seesWhat is stored
PageA picker over the site's pages; the chosen page's title and address./sluzby/
URLA text input for an outside address.https://example.org/
EmailAn address input.mailto:[email protected]
PhoneA number input.tel:+420123456789
FileThe media picker./files/brochure.pdf
AnchorA section id.#pricing

The kind is read off the stored value when a page opens and is never written to the file, so content written before this editor and every site build keep working unchanged.

- key: ctaHref
  type: link
  label: Button link
  regex: '^https?://' # optional: force an outside address

Page links are watched by the content index: when the target page is renamed through the CMS the links are updated with it, and a link to a page that disappeared is flagged in the editor. See Links and references.

KeyTypeEffect
defaultstringInitial value.
regexstringValidation pattern, same semantics as text.
variablesbooleanShow the {{variable}} paster on the URL kind. Defaults to true.

reference

A pointer at another entry of this site, for templates that resolve the target themselves at build time. Stores a plain string: the target's content file path, or the value of one of its fields.

- key: page
  type: reference
  label: Page
  collection: pages # which entries the picker offers (optional)
  by: field:translationKey # or `path` (the default)
  multiple: false # true stores a list
KeyTypeEffect
collectionstringOnly entries of this collection can be picked and matched. Any collection when absent.
bystringpath stores src/content/pages/cs/kontakt.md; field:<key> stores that field's value of the target, such as a translationKey.
multiplebooleanStore an array of references instead of one.

Use by: field:<key> when the site already resolves a key to a URL, the way the navigation in the Astro template links the language versions of a page by translationKey. Such a reference survives slug changes and file moves without any rewrite. Use by: path when the build loads the referenced entry directly (Astro's getEntry). The content index reports a reference whose target no longer exists as broken.

image

Picker + drag-drop upload. With storage: set, the picker scopes to that storage and the upload routes through it.

- key: hero
  type: image
  label: Hero image
  storage: uploads
  accept: image/png, image/jpeg
  maxSize: 5242880
  alt: hero_alt # the field next to it that holds the alt text
- key: hero_alt
  type: text
  label: Hero image description
KnobEffect
storageNamed storage from config.yml#storages. See Media library.
acceptComma-separated MIME glob list. Overrides the storage's accept.
maxSizeBytes. Overrides the storage's max_size.
altKey of the text or paragraph field (or localized group of them) in the same fields list that holds the image's alt text, or { from: [title, technique], separator: ' – ' } to compose it from several. See Field roles.
decorativetrue when the image needs no alt text (a background, an ornament). Not combined with alt.

The editor renders the value as an inline thumbnail. For non-images use file.

file

Same as image but for non-image attachments (PDFs, videos, audio).

- key: attachment
  type: file
  label: Attachment
  storage: uploads
  accept: application/pdf
  maxSize: 10485760

The editor renders the value as a file row (name + icon + type + size) rather than a thumbnail.

select

Single-select with an explicit option list.

- key: tier
  type: select
  label: Tier
  options:
    - free
    - pro
    - enterprise
  default: free
  widget: dropdown
KnobValuesEffect
optionsarray of strings or {value, label, description, labels}The allowed values.
defaultone of the option valuesInitial value.
widgetdropdown (default), radio, buttons, comboboxControls the input UI.

An option's labels holds its label per site language, for a site that shows the option on the page in each language (a title template with {field:kind|label} reads it). The editor shows label.

options:
  - value: painting
    label: Malba
    labels: { cs: Malba, en: Painting, it: Pittura }

A select can hold the noindex or draft role with noindexWhen or draftWhen, the values that switch it on (see Field roles).

dropdown is the universal default. radio for short lists where every option should be visible. buttons for visual toggles. combobox for long lists where the author needs to type-to-search.

group

Object field — a nested set of fields under a single key.

- key: hero
  type: group
  label: Hero
  fields:
    - key: heading
      type: text
      label: Heading
    - key: subheading
      type: paragraph
      label: Subheading
  preview:
    title: heading
KnobEffect
fieldsOrdered list of child fields. Recursive — groups can contain groups.
previewDrives the "drill-in card" rendering when the parent surfaces this group.
inlinetrue renders the child fields in place (bordered container) even where the group would otherwise be a drill-in card — right for small groups an author fills together, like per-language translations or a CTA's label + link.

The value is {heading, subheading} in YAML; the editor renders the inner fields inline at the parent level. A group mounted inside an array item renders as a drill-in card instead — unless it declares inline: true.

A group of languages

On a site that keeps every language of a page in one file, a text is a group with one field per language. localized: true says so, and fallback: names the language an empty one shows on the site:

- key: title
  type: group
  label: Title
  localized: true
  fallback: cs
  fields:
    - { key: cs, type: text, label: Czech }
    - { key: en, type: text, label: English }
    - { key: it, type: text, label: Italian }
KnobEffect
localizedtrue when the group's fields are the site's languages: one per language of preview.locales, keyed by it, and nothing else.
fallbackThe language whose text an empty language shows on the site, as your site's code does it. Only with localized: true.

The rules, and which collections may hold such a group, are under Languages in one file.

array

The richest field type. Each items[] entry is one allowed item shape — a group, a $ref to a block, or a primitive ({type: text} for arrays of strings).

- key: blocks
  type: array
  label: Content blocks
  items:
    - $ref: hero-compact
    - $ref: media-text
  idKey: _type
  minItems: 1
  maxItems: 10
  uniqueOn: slug
  uniqueOnMessage: 'Each block needs a unique slug.'
KnobEffect
itemsOne entry per allowed item shape. Single-entry = uniform array; multi-entry = multi-shape.
idKeyMulti-shape discriminator key on items. Defaults to _type. Override for content that uses kind:, block:, etc.
minItemsReject save when below this count.
maxItemsReject save when above this count; "Add item" disables at the cap.
uniqueOnRelative path within an item; rejects duplicates.
*MessageCustom messages for any of the above.

Single-shape

items:
  - type: text
    key: tag
    label: Tag

Every item is the same shape. No discriminator key on items.

Multi-shape

items:
  - $ref: hero-compact
  - $ref: media-text
  - $ref: stats-row

Each item carries a discriminator key (_type: by default) matching one entry's $ref target. The CMS reads + writes through this key. Changing idKey: after content exists requires a one-shot migration to rename the key on each item.

Primitive

items:
  - type: text
    key: tag

Arrays of strings, numbers, etc. No discriminator needed (the JS type is the discriminator). The editor renders a compact list with inline controls.

On this page