Skip to content

Frontmatter Fields

When Fern creates a new note it can scaffold a YAML frontmatter block at the top of the file. By default that block contains title and tags; you can add, reorder, or remove fields to match your own note-taking system.

Frontmatter fields are a vault-level setting: each vault can have its own schema independent of your global config.


Default scaffold

---
title: My Note
tags:
---

The built-in fields (title and tags) are always offered as the first rows in the editor but are protected: their name and type cannot be changed through the UI. You can still remove them if you do not want them.


Opening the fields editor

  1. Press ctrl+p to open the command palette.
  2. Search for Settings: Edit Vault Settings and select it.
  3. Navigate to the Frontmatter Fields row and press Enter.

The Frontmatter Fields modal opens.

The fields editor

At the top of the fields table you'll see the title and tags fields that are default for all Fern frontmatter and unchangable. Pressing a opens up a small form to add a new user, custom field to be included.

Key Action
Down Move cursor down
Up Move cursor up
Left / Right Move between Name, Type, and Default columns
Enter Edit the focused cell (or cycle type when on the Type column)
Space Cycle the field type when on the Type column
a Add a new field (opens a small inline form)
d Delete the selected field
Tab Move focus to the Save / Discard buttons
Esc Close (prompts for confirmation if there are unsaved changes)

Adding a field

Press a to open the add-field form. Tab through the three inputs:

  1. Name - the YAML key name (must not conflict with a built-in field).
  2. Type - cycle with Space, Left, or Right.
  3. Default - optional default value (supports placeholders, see below).

Press Enter on the Default field (or when it is focused) to confirm and add the field to the list.

Editing an existing field

Move the cursor to the row you want to change, then use Left/Right to select the column:

  • Name column + Enter - opens a text input for renaming.
  • Type column + Enter or Space - cycles through types in place.
  • Default column + Enter - opens a text input for the default value.

Field types

Type YAML representation Notes
text plain string Any text value
list YAML sequence (- item) Comma-separated input
number integer or float Default must be numeric
bool true / false Default must be true or false
date YYYY-MM-DD Default must be a valid date
datetime YYYY-MM-DDTHH:MM:SS Default must be a valid datetime
tags YAML sequence (for inline tags) Only one tags field allowed

Default value placeholders

The default value for any field can contain the following placeholders, which are substituted each time a new note is created:

Placeholder Replaced with
{{TITLE}} The stem of the new note (the filename without extension)
{{DATE}} Today's date in YYYY-MM-DD format
{{DATETIME}} The current date and time in YYYY-MM-DDTHH:MM:SS format

Manual configuration

The fields list is stored in the vault config file ({vault}/.fern/config.toml) under the key note_frontmatter_fields. Each entry is an inline table with name, type, and an optional default.

# {vault}/.fern/config.toml
note_frontmatter_fields = [
  {name="title",    type="text",   default="{{TITLE}}"},
  {name="tags",     type="tags",   default=""},
  {name="status",   type="text",   default="draft"},
  {name="priority", type="number", default="0"},
  {name="created",  type="date",   default="{{DATE}}"},
]

When note_frontmatter_fields is absent or empty, Fern falls back to the default two-field scaffold (title + tags).

To disable the frontmatter scaffold entirely, set note_frontmatter = false in your config.