Site structure

A Splitleaf site is a folder of plain files on your computer. The folder is the source of truth. The App reads it, writes it and watches it. There is no database and no hidden copy of the site.

The files of a site

northlight-coffee/
  • splitleaf.config.jsonpage list, settings, hosting link
  • AGENTS.mdrules for agents (optional)
  • pages/every page is an HTML file
    • index.htmlthe home page, /
    • about.html/about
    • 404.htmlthe "not found" page
    • _templates/one design per collection
      • blog.htmlthe page for each blog post
  • components/built once, used on every page
    • site-header.htmlone file for each component
  • styles/the CSS of the site
    • site.cssthe class rules of the site
    • variables.csscolours, sizes and other variables
    • fonts.cssmade by the App from the font settings
  • content/the CMS, in Markdown
    • blog/one collection
      • _collection.jsonthe fields of the collection
      • SKILL.mdwriting rules for this collection (optional)
      • summer-pop-up/one post
        • _item.jsonthe field values of one post
        • content.mdthe post text, in Markdown
  • public/static files, copied to the site root
    • assets/images, fonts and other files
  • dist/the build output, made on publish

A new site starts with splitleaf.config.json, pages/index.html, pages/404.html and an empty public/assets/. The other folders come when you need them.

PathWhat it holds
pages/One HTML file for each page. The file is the page.
pages/_templates/<collection>.htmlThe page for every item of a collection. It is not a page with its own URL.
components/<slug>.htmlOne component. See Component files.
styles/site.css, styles/variables.cssThe CSS of the site. You write these files, or the Design panel writes them.
styles/fonts.cssGenerated from the font settings. Do not edit it.
content/Collections and items. See Content files.
public/Static files. A publish copies them to the site root, so public/assets/logo.svg is /assets/logo.svg.
AGENTS.md, content/<collection>/SKILL.mdRules for agents. See Code editor and other tools.
dist/The build output. A publish makes it again each time. Do not edit it.

Pages

The path of the file is the URL of the page.

FileURL
pages/index.html/
pages/about.html/about
pages/menu/espresso.html/menu/espresso
pages/menu/index.html/menu
pages/no/about.html/no/about, the Norwegian translation of /about

A directory under pages/ is a folder in Pages, also when it is empty.

The <head> of the file holds the SEO of the page: title, description, Open Graph, JSON-LD, canonical and robots. Page settings writes these tags into the file. A hand edit of the tags shows in Page settings.

The status of a page is a tag in its head:

<meta name="splitleaf:status" content="draft">
TagStatus
No tagPublished
content="draft"Draft. The page is not built.
content="archived"Archived. The page is not built.

splitleaf.config.json

This file is the only Splitleaf file in the site folder. It holds the page list, the site settings and the hosting link.

{
  "$schema": "https://splitleaf.eu/schema/config.v3.json",
  "id": "…",
  "name": "Northlight Coffee",
  "pages": [
    { "path": "index.html", "name": "Home" },
    { "path": "about.html", "name": "About" },
    { "path": "_templates/blog.html", "name": "Blog" },
    { "path": "404.html", "name": "404" }
  ],
  "settings": {
    "siteUrl": "https://example.com",
    "redirects": [],
    "i18n": { "locales": ["en"], "defaultLocale": "en" }
  },
  "integrations": {
    "git": { "provider": "github", "owner": "northlight", "repo": "northlight-coffee", "defaultBranch": "main" },
    "deploy": { "target": "vercel" }
  }
}
KeyWhat it is
$schemaThe JSON Schema of the file. The v3 in the address is the format of the site.
idThe site ID on the Splitleaf server. The App writes it when the site is registered.
nameThe site name
pagesThe order and the names of the pages in Pages. A page file that the list does not name is a page all the same.
settingsSite settings: the site URL, head and footer code, redirects, robots, sitemap, images, favicon, languages
integrationsThe GitHub repository and the host. Never a token.

The file has no SEO and no page status. These are in the page heads.

Edit the file by hand

You can edit the file in any editor. Your editor can read the $schema address and check the file as you type.

  • The App keeps keys it does not know. You can add your own notes as extra keys.
  • A key with the wrong type stops the read. The App names the key and does not write over the file.
  • The Site settings tabs write only the keys you change.

The three schemas are public:

  • https://splitleaf.eu/schema/config.v3.json
  • https://splitleaf.eu/schema/collection.v1.json
  • https://splitleaf.eu/schema/item.v2.json

What lives in app data

The App keeps its own files outside the site folder. Your repository never holds chats, history or caches.

WhatWhere
Removed files and the audit logApp data
History (the versions of each file)App data
Agent chats, and agent changes that wait for reviewApp data
Team sync state, backups of the page list, linked asset foldersApp data
Image cache, home preview, IndexNow queue, the vercel.json for the uploadCache
SystemApp dataCache
macOS~/Library/Application Support/Splitleaf/sites/<store>/~/Library/Caches/Splitleaf/sites/<store>/
Windows%APPDATA%\Splitleaf\sites\<store>\%LOCALAPPDATA%\Splitleaf\Cache\sites\<store>\

<store> is a folder that the App picks for each site folder.

The App data belongs to the folder, not to the site ID. A copy of the folder gets its own app data. The copy never shares History, chats or Removed with the folder it came from.

Caution: Do not edit or delete files in app data. The App uses them to restore your work.

Note: A site made with an older version of the App has a .opt-one/ folder. When you open the site, the App asks to update it to this layout. The App keeps a copy of every file that the update changes.