Skip to main content
A Content item is a concrete instance of a ContentType that follows the structure defined by its associated layout component. Content items maintain status-based versioning (draft/published) and reference specific package versions for stability.

Key Concepts

ContentType Binding

References a specific ContentType version that determines the layout, allowed components, and package version.

Self-Contained

Stores type version reference and maintains derived package and layout references for rendering stability.

Template Support

Content can serve as templates that inherit type structure and can be used as starting points for new content.

Compiled Output

System automatically generates BindJS code from JSON content structure for native rendering.

The Content Object

id
string
Unique identifier (UUID)
typeId
string
Reference to the ContentType
typeVersion
number
Version of the ContentType used
version
number
Content version number (increments on publish)
lastPublishedVersion
number
Last published version number (null if never published)
packageVersion
string
Package version being used (derived from typeVersion, immutable)
name
string
Display name
description
string
Structured markdown description for semantic search
status
string
Current status: draft, modified, published, unpublished, or deleted
isTemplate
boolean
Indicates if this is a template content
content
object
JSON structure where layout properties and component arrays are direct properties
compiled
string
Auto-generated BindJS code for rendering (system-managed)
tags
string[]
Categories/attributes for filtering
metadata
object
Additional content metadata
createdAt
string
Creation timestamp (ISO format)
updatedAt
string
Last update timestamp (ISO format)

Example Content

{
  "id": "cont124",
  "typeId": "ct123",
  "typeVersion": 2,
  "version": 1,
  "lastPublishedVersion": 1,
  "packageVersion": "1.0.0",
  "name": "Getting Started Guide",
  "description": "Getting Started with Metabind. A comprehensive guide...",
  "status": "published",
  "isTemplate": false,
  "content": {
    "title": "Getting Started with Metabind",
    "subtitle": "Your complete guide",
    "heroImage": "asset124",
    "author": "Jane Doe",
    "components": [
      {
        "type": "ArticleParagraph",
        "text": "Welcome to Metabind..."
      },
      {
        "type": "ArticleHeading",
        "text": "Key Features",
        "level": 2
      }
    ]
  },
  "compiled": "const body = () => { ... }",
  "tags": ["Technology", "Tutorial"],
  "metadata": {
    "author": "[email protected]",
    "publishedAt": "2024-03-21T14:30:00Z",
    "locale": "en-US"
  },
  "createdAt": "2024-03-21T10:00:00Z",
  "updatedAt": "2024-03-21T14:30:00Z"
}

Content Structure

Content is stored as JSON where layout properties and component arrays are direct properties:

Single Section Example (Article)

{
  "title": "Getting Started with Metabind",
  "author": "Jane Doe",
  "publishDate": "2024-03-21",
  "heroImage": "asset456",
  "components": [
    {
      "type": "ArticleParagraph",
      "text": "Welcome to Metabind..."
    },
    {
      "type": "ArticleHeading",
      "text": "Key Features",
      "level": 2
    }
  ]
}

Multi-Section Example (Quiz)

{
  "layout": "split",
  "shortTitle": "Math Quiz 1",
  "questions": [
    {
      "type": "Paragraph",
      "text": "What is the value of pi to 2 decimal places?"
    }
  ],
  "answers": [
    {
      "type": "AnswerMultipleChoice",
      "options": ["3.12", "3.14", "3.16", "3.18"],
      "correct": 1
    }
  ]
}

Key Principles

  1. Direct Properties: Layout properties and component arrays are direct properties of the content object
  2. Layout Properties: Properties defined by the layout component (title, subtitle, etc.)
  3. Component Arrays: Arrays of components, conventionally named “components” but can be any name
  4. Multiple Sections: Layouts can define multiple component arrays (e.g., “questions”, “answers”)
  5. Type Validation: All properties validated against the ContentType’s generated schema

Description Best Practices

Content descriptions follow a structured format for semantic search:
[Title or headline]. [Brief summary of the content].

**Topics:** [Main topics covered]
**Key points:** [Primary takeaways]
**Length:** [Word count or duration]
**Language:** [Content language]
Aim for 250-350 characters. Maximum is 500 characters.