File formats
SP CMS picks a format from the file extension, so you rarely need to set one. Set format on a collection or file only to override the guess.
Inferred formats
A collection's extension comes from its filename template; a file's comes from its path.
All formats
Front matter and the body
In front matter formats, each field maps to a front matter key, except a field named body, which maps to everything below the front matter:
fields:
- name: title
type: string
- name: body
type: rich-textFor non-standard delimiters, set delimiters, for example delimiters: "+++" or delimiters: ["<!--", "-->"].
If SP CMS can't read a file in a collection, the file stays in the list but some fields may be missing. A warning names the affected files; after fixing them, choose Refresh to check them again.
Source editing
Content with fields is always edited and saved through its form, so the rules in .pages.yml are checked on every save. Only content without fields opens as source. That's useful for robots.txt, redirect rules or snippets:
- name: redirects
label: Redirects
type: file
path: public/_redirects
format: codeFiles with known code extensions open in the code editor automatically. Set format: code for files without an extension, such as _redirects.
Keeping unknown keys
By default, saving a structured file writes only the keys your fields describe. If your fields cover only part of a file, set settings.content.merge: true to keep the rest.