Pages CMS
  • GitHub GitHub
  • Discord Discord

Getting started

  • Introduction
  • Quick start

Configuration

  • Overview
  • Media
  • Content
    • Overview
    • Editors
    • Filename
    • List
    • Fields
    • View
  • Components
  • Actions
  • Collaborators
  • Settings

Fields

  • Block field
  • Boolean field
  • Code field
  • Date field
  • File field
  • Image field
  • Number field
  • Object field
  • Reference field
  • Rich-text field
  • Select field
  • String field
  • Text field
  • UUID field

Guides

  • Installing
    • Install locally
    • Deploy on Vercel
    • Self-host
    • GitHub App
  • Upgrading to 2.x
  • Migrating collaborators
  • Creating a custom field

Development

  • Authentication
  • Caching
  • Database
  • Fields
  • Environment variables
GitHubGitHub
DiscordDiscord
Getting started
Introduction
Quick start
Configuration
Overview
Media
Content
Overview
Editors
Filename
List
Fields
View
Components
Actions
Collaborators
Settings
Fields
Block field
Boolean field
Code field
Date field
File field
Image field
Number field
Object field
Reference field
Rich-text field
Select field
String field
Text field
UUID field
Guides
Installing
Install locally
Deploy on Vercel
Self-host
GitHub App
Upgrading to 2.x
Migrating collaborators
Creating a custom field
Development
Authentication
Caching
Database
Fields
Environment variables

Code field


View as Markdown Open in ChatGPT Open in Claude Cursor Open in Cursor
Boolean field
Date field

Code editor with syntax highlighting.

Use for snippets, templates, or small config blocks.

Options

Key Description
format Values: yaml, yml, javascript, js, jsx, typescript, ts, tsx, json, html, htm, markdown, mdx.

Examples

JavaScript snippet

- name: snippet
  type: code
  options:
    format: javascript

MDX snippet

- name: article
  type: code
  options:
    format: mdx
Boolean field Date field

On this page

  1. Options
  2. Examples
    1. JavaScript snippet
    2. MDX snippet