$ data

Collections

A collection is typed content — like a database table. Author records once and render them into data-driven pages on your subdomain.

Collections and forms share one engine

Collections and forms are the same typed-record store under the hood; each just has a primary type. A collection’s home is authored content for pages; a form’s home is capturing public submissions. Overlap is allowed — a collection can still enable a public form — but you pick one primary type when you create it.

Collections & records

A collection is a user-defined data type with a field schema; a record is one object in it. Each field has a key, a label, a type, and a required flag.

Field types

  • text, textarea, number, boolean, date, email, url
  • select — a fixed set of options
  • list — many items: either a list of primitives, or a list of objects with their own sub-fields

Mark a field searchable to include it in full-text search, and indexed to filter or sort by it.

The slug field

Pick one field as the collection’s slug field — its value becomes each record’s URL slug. This is required for a per-record detail page, so each record gets its own URL under a base path (e.g. /products/<slug>).

Data-driven pages

Bind a page template to a collection and hostdocs renders your records into it — a list page for all records, or a detail page per record. The template uses simple tokens like {{ fieldKey }} and {{#each listField}} … {{/each}}. See Data-driven pages for the full template syntax.

Build one

  1. Create a collection (e.g. “Products” or “Blog Posts”) under Collections.
  2. Define its fields.
  3. For detail pages, set the slug field.
  4. Add records in the dashboard or from your AI assistant over MCP.
  5. Publish a page bound to the collection.
You can do this end-to-end from Claude or ChatGPT — see the MCP reference for the collection, record, and bind tools.