Field Types
rudis-cms supports various field types for different data needs.
Basic Types
id
Primary identifier for the record.
id:
type: id
- Stored as
TEXTin SQLite - Automatically indexed
- Must be unique within the table
string
Text content.
title:
type: string
required: true
- Stored as
TEXTin SQLite
boolean
True/false values.
published:
type: boolean
index: true
- Stored as
INTEGER(0/1) in SQLite
date
Date without time.
published_date:
type: date
index: true
- Stored as
TEXTin ISO 8601 format (YYYY-MM-DD) - Indexed using
date()function
datetime
Date with time.
created_at:
type: datetime
index: true
- Stored as
TEXTin ISO 8601 format - Indexed using
datetime()function
hash
Content hash for change detection.
hash:
type: hash
- Automatically computed from file content
- Useful for cache invalidation
Content Types
markdown
Markdown content with optional image extraction.
body:
type: markdown
required: true
storage:
type: kv
namespace: content-namespace
image:
table: post_images
inherit_ids: [post_id]
embed_svg_threshold: 8192
storage:
type: r2
bucket: my-bucket
prefix: images
config: {}
Options:
storage: Where to store the compiled markdownimage: Configuration for extracted imagesimage.embed_svg_threshold: SVG files smaller than this (bytes) are embedded inlineconfig: Additional markdown processing options
image
Single image field.
og_image:
type: image
storage:
type: r2
bucket: my-bucket
prefix: og-images
file
Generic file attachment.
attachment:
type: file
storage:
type: r2
bucket: my-bucket
prefix: attachments
Relational Types
records
Nested table with multiple records.
tags:
type: records
table: post_tags
inherit_ids: [post_id]
schema:
tag:
type: id
Creates a separate table with foreign key relationship.