Skip to main content

Overview

The dex notes command manages markdown-based editorial posts for Dex Notes, including creation, editing, building, and publishing.

Usage

dex notes <list|add|edit|set|build|validate|publish> [args]

Subcommands

List

List all markdown posts with metadata.
dex notes list
Output shows slug, published date, and title for each post.

Add

Create a new notes post draft.
dex notes add [--title ... --slug ...]
--title
string
Post title
--slug
string
URL-friendly slug for the post
This command creates a new markdown file with JSON frontmatter in the notes content directory.

Edit

Edit a notes post in your default editor.
dex notes edit --slug <slug>
--slug
string
required
Slug of the post to edit
Uses $VISUAL or $EDITOR environment variable to determine which editor to launch.
The updated_at_iso field is automatically updated when you save.

Set

Set a specific frontmatter field value.
dex notes set --slug <slug> --field <frontmatter-key> --value <value> [--json]
--slug
string
required
Slug of the post to update
--field
string
required
Frontmatter field name to set
--value
string
required
New value for the field
--json
boolean
Parse value as JSON instead of plain string
Allowed fields include all required frontmatter keys plus any custom fields in the existing frontmatter.

Build

Build the notes bundle from markdown sources.
dex notes build
This command:
  • Processes all markdown posts
  • Generates HTML from markdown content
  • Builds the notes bundle for deployment

Validate

Validate notes integrity and schema compliance.
dex notes validate
Validation checks:
  • Frontmatter schema compliance
  • Required fields present
  • Content integrity

Publish

Complete publish pipeline: build, sync, and validate.
dex notes publish
This command runs:
  1. dex notes build - Build notes bundle
  2. Sync runtime CSS
  3. dex notes validate - Verify integrity
Use publish for production deployments to ensure all steps complete successfully.

Examples

Create a new post

dex notes add --title "Introducing Season 3" --slug "season-3-announcement"

Edit a post

dex notes edit --slug "season-3-announcement"

Update post metadata

dex notes set --slug "season-3-announcement" --field "published_at_iso" --value "2026-03-01T12:00:00.000Z"

Build and validate

dex notes build
dex notes validate

Full publish workflow

dex notes publish

Frontmatter Structure

Notes posts use JSON frontmatter with these required fields:
{
  "slug": "post-slug",
  "title_raw": "Post Title",
  "published_at_iso": "2026-03-01T12:00:00.000Z",
  "updated_at_iso": "2026-03-07T10:30:00.000Z"
}
Additional custom fields can be added as needed.

Workflow

1

Create draft

Use dex notes add to create a new post with frontmatter
2

Write content

Edit the markdown file using dex notes edit --slug <slug>
3

Update metadata

Set publication date and other fields using dex notes set
4

Build and validate

Run dex notes build and dex notes validate to check for issues
5

Publish

Deploy using dex notes publish to complete the full pipeline

See Also

Build docs developers (and LLMs) love