Skip to content

Special Fields

Astro Editor treats a few frontmatter fields specially – both in the frontmatter sidebar and elsewhere. The title, date, description, and draft fields can each be set to another field for a collection in Project Settings. What each uses when you haven’t set it is in the Settings Reference.

Represents the item’s title. Uses title by default, or the field set in Project Settings. The title field is special in the following ways:

  • File list — shown as each file’s name in the sidebar, falling back to the filename when unset.
  • Frontmatter panel — rendered as a larger, bold, auto-expanding input which always appears at the top of the panel. A Copy as slug button is shown below which copies a URL-friendly version of the title to your clipboard.
  • Sorting — used as the Title sort option, and the alphabetical tiebreaker which the Default sort uses for files that share a date or have none.
  • Filtering — the filter box matches against the title as well as the filename.
  • Content Finder — entries are listed and searched by their title.
  • New files — a title field is pre-filled with a placeholder like “New Article”. If the collection’s file name pattern uses {title}, the file is renamed from the title when you first write one.

Represents the item’s primary date – usually its published date. With a generated schema, it’s the first of pubDate, date and publishedDate that the schema defines as a date, and that one field is used for every file in the collection. Without a schema, each file is checked for those names in that order. You can set a different field in Project Settings. The date field is used here:

  • File list — shown next to each file if set, and used by the Default sort (newest first).
  • New files — set to today’s date when new files are created.
  • File names — if a file’s name has a date in it, by its collection’s file name pattern, a Rename file to match link appears below the date when the two differ. It changes only the date in the name.

This one is purely cosmetic: a field named description (or the one set in Project Settings) is rendered as an expanding multi-line textarea in the sidebar.

Signifies that a content item is a draft. Uses draft by default, or the field set in Project Settings. A file counts as a draft only when this field is set and is exactly true. It’s used for:

  • File list — draft files show a Draft badge in the sidebar.
  • Draft filtering — the “Show Drafts Only” toggle uses this field. See Drafts, Filtering & Sorting.

Unlike the fields above, slug isn’t a configurable mapping. Astro Editor always looks for a field named exactly slug and uses it only when a collection has a URL pattern configured: the {slug} placeholder is filled from the slug field rather than the entry’s id. See Links for more.