Docs Content and forms
CMS
Collections of items with the same fields (posts, projects, people) that your site’s code reads. Edits wait until you publish them.
Collections and fields
Open a site’s CMS. Make a collection, then press Fields to give it its fields: each has a label, a kind and a key. The key is the name your code and the generated types read, and it never changes when you rename the label. Every change in Fields waits until Save, which first tells you what it will do to the items (a removed field takes its value off every item).
| Kind | Holds | Your code reads |
|---|---|---|
| Text, Multi-line text | Any text | Text |
| Rich text | A small Markdown: bold, italic, links, images, headings, lists, quotes | Markdown and HTML |
| Image, Gallery | An upload or an address, with alt text; a gallery holds up to 50 | {url, alt} |
| Link, File URL | An address or a path | Text |
| Number | A plain decimal, such as 1299.5 | A number |
| Date, Date & time | YYYY-MM-DD, or a time, read in the site’s time zone | A date, or an ISO time in UTC |
| Toggle | Yes or no | true or false |
| Option, Multi-option | One, or several, of up to 50 choices | The choice, or a list |
| Reference, Multi-reference | Items of a collection on the site | Item ids |
| Colour | A hex colour | Lower-case hex |
A field’s kind is not changed once it holds values: what is stored is never converted. Add a new field for a new kind.
Publishing items
An edit changes an item’s working copy. Your live site, through production content keys, keeps the item as it was last published until you publish it again. Every item says where it stands:
| Status | Means |
|---|---|
| Draft | Kept out of every publish. |
| New | Not live yet; goes live when you publish it. |
| Published | Live, as it stands. |
| Changed | Live, with edits that go live when you publish it. |
- Publish a row, or Publish changes under a collection, to put items live now.
- Discard changes puts a changed item back to its published values.
- Unpublish takes an item off the live site at once and marks it draft.
- A new address, the order of items and Delete take effect at once.
Languages and time zone
A site can hold its content in more languages than its own. Mark a field Translated and it holds a value for each language; the Content API serves the one asked for. The CMS time zone is the one dates and times are entered and shown in.
Limits
Every site holds up to 10,000 items and 200 collections, on any plan.
From an agent
With collections:read and collections:write, an agent reads and writes the CMS over MCP: create_collection, add_field, add_items (up to 500 at once), update_item, publish_items and the rest. Its writes are staged like yours, and a value that does not fit its field comes back as a warning rather than being stored as sent.