Collections & fields
Collections define the structure of your content. Each collection has a schema — a list of fields — and contains entries.
Creating a collection
Go to Schema in the admin sidebar. Click New collection, give it an ID (e.g. posts) and a label. Then add fields.
The collection ID is used in code:
const posts = await getCollection('posts'); Field types
| Type | Input | Stored as |
|---|---|---|
string | Single-line text | TEXT |
richtext | Block editor — Markdown output | TEXT (Markdown) |
number | Numeric input | TEXT |
url | URL with validation | TEXT |
email | Email with validation | TEXT |
date | Date picker | TEXT (ISO date) |
datetime | Date + time picker | TEXT (ISO datetime) |
select | Dropdown | TEXT (option key) |
array | Tag input | TEXT (JSON array) |
weekdays | Weekday multi-select | TEXT (JSON array) |
image | Media picker — drop-zone with inline preview | TEXT (media UUID → _media) |
boolean | On/off toggle | TEXT (true / false) |
relation | Entry picker (cross-collection) | TEXT (JSON array of UUIDs) |
Singleton collections
Mark a collection as singleton in the Schema editor to give it exactly one entry that opens directly from the sidebar — no entries list. Useful for site-wide settings, an About page, or a homepage hero block.
On first open, Orbiter auto-creates the entry with slug index. The collection appears in the sidebar with a ◈ icon.
Entry order
Drag the ⠿ handle on any row in the entries list to manually reorder entries. The order is stored in the pod and respected by getCollection().
The drag handle is only visible when no status filter (Draft / Published) is active.
Field options
// Boolean field
{
type: 'boolean',
label: 'Featured',
}
// Select field
{
type: 'select',
label: 'Category',
options: ['news', 'tutorial', 'release'],
optionLabels: { news: 'News', tutorial: 'Tutorial', release: 'Release' },
}
// Relation field
{
type: 'relation',
label: 'Author',
collection: 'authors',
multiple: false,
}
// Conditional visibility
{
type: 'string',
label: 'Event location',
showWhen: 'category:event', // only visible when `category` equals "event"
} Entries
Each entry has a slug (URL-safe identifier, unique within its collection) and a status of draft or published. Only published entries are included in orbiter:collections.
Version history
Every save creates a version snapshot. In the editor, click the clock icon to browse and restore previous versions. Versions are stored in _versions in the pod.
Entry shape
{
id: '550e8400-...', // UUID
slug: 'my-first-post',
status: 'published',
created_at: '2025-01-01 12:00:00',
updated_at: '2025-06-01 09:15:00',
data: {
title: 'My first post',
body: '<p>...</p>', // richtext → rendered HTML
image: '3fa85f64-...', // media UUID
author: { ... }, // resolved Entry object (relation)
tags: ['astro', 'cms'], // array field
}
}