Skip to content

Frontmatter

The frontmatter sits at the top of every post as a list of fields, one row per key. Zeku writes ordinary YAML back to the file, so nothing about the format changes.

Each field’s type comes from your collection’s schema:

In your schema In Zeku
z.string(), z.enum() Text, with suggestions from values used elsewhere
z.number() Number
z.boolean() Checkbox
z.date(), z.coerce.date() Date, or date and time when the value has a time
z.array(z.string()) List
tags Tags, with suggestions from every tag in the collection
reference('authors') Text, with the entries of that collection as suggestions
image() Text holding the image path

For the most accurate types, run astro sync or astro dev once after you change your schema. Astro writes a JSON schema for each collection to .astro/collections/, and Zeku reads it. A field your schema requires is marked, and a key your schema doesn’t declare is flagged.

  • To add a field, click Add field under the list. Suggestions come from the keys your schema declares and the keys your other posts use.
  • To change how a field is edited, click the icon beside its name and choose Field type. The choice is saved in the project’s .zeku/types.json, so it follows the project to other computers.
  • To remove a field, click its icon and choose Remove.

If your collection has a draft field, the dashboard shows drafts and published posts separately. Click the Published or Draft badge on a post’s card to switch it, or change the field in the frontmatter.

Three settings in Settings > Usability decide how Zeku writes dates:

  • Date format shapes every date Zeku writes, in moment tokens such as YYYY-MM-DD. Astro’s schema can’t say which format a site uses, so Zeku asks.
  • Date on publish stamps today’s date on a post when it goes from draft to published. It’s off by default.
  • Stamp modified on save updates the collection’s last-modified field every time you save. It’s off by default.