Content files

Content collections live in content/, as JSON and Markdown files. A collection is a folder. An item is a folder in it. Git can show every change to a post, line by line.

To work with content in the App, see Content.

The layout

content/
  • blog/the collection. The folder name is its ID.
    • _collection.jsonthe fields of the collection
    • SKILL.mdwriting rules for agents (optional)
    • welcome-to-northlight/one item. The folder name is its slug.
      • _item.jsonthe field values
      • content.mdthe "content" field, in Markdown
      • content.no.mdits Norwegian translation
      • _brief.mdnotes and sources behind the item (optional)
    • summer-pop-up/
      • _item.json
      • content.md

The collection file

content/<collection>/_collection.json holds the name of the collection and its fields.

{
  "$schema": "https://splitleaf.eu/schema/collection.v1.json",
  "name": "Blog",
  "description": "Posts from the roastery.",
  "icon": "note-pencil",
  "fields": [
    { "id": "f-title", "name": "title", "label": "Title", "type": "title", "required": true },
    { "id": "f-slug", "name": "slug", "label": "URL Slug", "type": "slug", "required": true },
    { "id": "f-excerpt", "name": "excerpt", "label": "Excerpt", "type": "text" },
    { "id": "f-cover", "name": "coverImage", "label": "Cover image", "type": "image" },
    { "id": "f-date", "name": "publishedAt", "label": "Published", "type": "date" },
    { "id": "f-content", "name": "content", "label": "Content", "type": "content" }
  ]
}
KeyWhat it is
nameThe name of the collection in the Content panel
fieldsThe fields. name is the key in _item.json. label is the name people see.
parentFolderOptional. A page folder for the item URLs, for example "resources"

The file has no id. The folder name is the ID of the collection.

These are the field types: title, text, content, richtext, boolean, number, date, datetime, select, multiselect, url, slug, image, images, color, reference, multireference, list, group.

The item files

_item.json holds the field values of one item, as top-level keys.

{
  "$schema": "https://splitleaf.eu/schema/item.v2.json",
  "id": "post-summer-pop-up",
  "title": "Summer pop-up",
  "excerpt": "Cold brew at the beach kiosk, July and August.",
  "coverImage": "/assets/kiosk.jpg",
  "publishedAt": "2026-06-28",
  "_archived": true,
  "createdAt": "2026-06-28T09:00:00.000Z",
  "updatedAt": "2026-09-01T09:00:00.000Z"
}
KeyWhat it is
Field names, for example titleThe values of the fields
idThe item ID
draft, archivedThe status you set. The App writes them only when they are true.
localesTranslated field values, for example { "no": { "fields": { "title": "Sommerkiosk" } } }
createdAt, updatedAtDates the App sets

The file has no slug. The folder name is the slug.

A field of the type content is a Markdown file beside _item.json, named after the field: content.md. Its translation is content.<code>.md, for example content.no.md.

Note: Item pages publish in the default language only. The App keeps your translated values, but the live site does not show them yet.

A reference field holds the slug of the item it points to.

Note: To change a slug, use the App. The App renames the folder and updates every reference to the item.

Item status

_item.jsonStatus
No status keyPublished on the next publish
"_draft": trueDraft. Not built.
"_archived": trueArchived. Not built.

The App does not write a "live" flag into the item. It compares the item with the live commit in Git to know if the item is new, edited or live.

An item with an empty required field is Incomplete. A publish does not put it live.

Content templates

pages/_templates/<collection>.html is the page for every item of the collection. Each published item gets its own page at /<collection>/<slug>.

ItemURL
content/blog/summer-pop-up//blog/summer-pop-up
The same item, with "parentFolder": "resources"/resources/blog/summer-pop-up

In a template, every binding reads the item of the page:

<article class="article">
  <h1 class="article-title" data-bind-text="title">Post title</h1>
  <p class="article-lead" data-bind-text="excerpt">A short excerpt of the post.</p>
  <div class="prose" data-bind-html="content">
    <p>The post's content appears here.</p>
  </div>
</article>

The title, description, Open Graph and JSON-LD in the head of a template can hold ${field} tokens. Example: <title>${title} · Northlight Coffee</title>.

For lists of items on other pages, see Data attributes.

Edit content files by hand

  1. Open the item file in your editor, for example content/blog/summer-pop-up/content.md.
  2. Make the change.
  3. Save the file.

The App reads the change. If the item is open with no unsaved edit, the item editor shows your change.

  • A save from the App carries the version it was made on. A save over files that changed on disk does not land as it is.
  • A file with a newer $schema than the App knows is read-only. The App shows This item was saved by a newer Splitleaf. Update to edit it.
  • _brief.md is never content. The build does not read it.