← @mortar-kit/core

Docinterface

import { Doc } from '@mortar-kit/core'

interface Doc<F = Record<string, unknown>>

One document of a collection.

Properties

id: string

Stable id: references store it, so it never changes (unlike the slug).

slug: string

The document's address within its collection, e.g. hello-world. Unique per collection.

position?: number

Where the document is in its collection's manual order (lower first), when the collection is orderable. createContent sets it: on the first save and on move; saves keep the stored one.

fields: F

The collection's fields.

entries?: PageEntry[]

Brick entries; always an array when the collection has a body.