Skip to main content

Module schema

Module schema 

Source
Expand description

Content model types driven by the schema.

The schema defines frontmatter fields, types, and UI widget hints. The built-in schema is generated from crate::schema_fields::BUILTIN_FIELDS, the single source of truth for all frontmatter fields moss recognizes. Plugin-contributed schemas are still parsed from JSON via parse_schema().

All types derive Serialize + Deserialize so they can cross the Tauri command boundary.

Structs§

ContentSchema
The top-level content schema.
FieldDefinition
A single field definition in the frontmatter schema.
FrontmatterSchema
Frontmatter schema: a map of field name to definition.
ShortcodeDefinition
A single shortcode definition.
ShortcodeParam
A shortcode parameter.
ShortcodeSchema
Shortcode schema: delimiters and named definitions.

Enums§

FieldType
Supported field types.
Widget
UI widget types.

Functions§

builtin_schema
Return the built-in content schema.
parse_schema
Parse a content schema from a JSON string.