Fields
Using fields in Spinal is a way to make sure all its keys and values are consistent throughout your collection’s content. Opposed to using the flat-file format your static generator provides, where you can add whatever key/value. The UI Spinal gives makes it way easier for your team to edit these values, instead of thinking about the format it needs to.
In your static site generator these fields are known as Frontmatter, found at the top of your markdown files.
Supported formats
Spinal has support for yaml and toml formatted Frontmatter. It is a configuration file format for defining metadata such as title, author and template for a website or blog.
YAML
YAML (YAML Ain’t Markup Language) is the most common format used in static site generators. In Spinal data between two --- at the top of the markdown are parsed. For example:
---
title: Fields
description: Fields are what static site generators use to store content's metadata.
---
TOML
TOML (Tom’s Obvious, Minimal Language) is also common with certain frameworks. Spinal parses data between two +++ at the top of the markdown file.
Edit field settings
To make changes to your fields, go to your collection’s settings and find the Fields tab. Any field found in your collection is collected and shown here.
Let’s go over each of these settings as there is quite a lot to it.
Key
Think of it as the identifier of the field. It’s the part before the value, eg. section: Collections. You can only set the key when creating a new field.
Type
The type determines how the field shows up in your editor and how it’s added in the markdown file when published. It can be one of the following:
- string (default type): a single line of text;
- text: shows as a textarea for longer text;
- number: returns a non-string number value;
- boolean: shows as a checkbox to be either true or false;
- datetime: shows as a datetime field;
- select: allows to choose one value;
- multi select: shows as multiple checkboxes, returns an array;
- hash: a nested key/value structure (e.g. an address or SEO metadata). Detected automatically when Spinal imports content that uses one;
- array: a list of values. Detected automatically when Spinal imports content that uses one.
The hash and array types are picked up from your existing content automatically — you don’t choose them when creating a field, but once present they’re edited just like any other field in the editor.
Required
Mark a field as Required to force a value before content can be published. If a required field is empty, publishing is blocked and the writer is notified.
Minimum and maximum characters
These two fields work together. They validate if the string or text input type is within the minimum and maximum range. If not, publishing that content is not possible. When selecting Publish…, the validation message is shown to the writer notifying them to make the needed changes.
Instructions
The instructions text shows below the field in the editor’s Content settings panel. It can be used to guide your writers on the input needed or why the field is there.
Allowed values
Allowed values is a comma-separated list of values that works only with the select and multi select field types. If you imported existing content, the allowed values are collected for you.
Include in new content
Not all fields need to be added when you create new content. When Include in new content is checked, the field is added to the new content. You can always remove it from your content if not needed after all.
Read only
You can mark any field as read only. When checked, the field is still shown in the editor’s content settings sidebar, but the value can’t be changed.
Default value
Both the, default available, filename and folder fields and all string, text and number types have the option to set a default value. You insert any kind of text that will be added by default for those fields when you create new content.
You could add in a static value, like /posts for the path, but you can also add a magic value that is transformed upon creation, example: posts/%Y-%m-%d-new-content.md. This gets transformed, upon new content creation, as posts/2026-01-01-new-content.md. Assuming today was the first day of 2026. You can use any strftime directives.
The default value only works for the fields marked as Include in new content.
Reorder fields
Drag and drop fields in the Fields tab to change their order. The order applies to the fields in the editor’s Content settings panel and to new resources.
Create a new field
If you need a new field, you can easily create it. Select Add field from the Fields screen and a new set of fields shows. This set is the same as editing a field, except for the fact you can choose the key.
Have questions?
Something still unclear? Reach out to support. No bots or agents, but real humans.