pub struct BuiltinField {Show 14 fields
pub name: &'static str,
pub field_type: FieldType,
pub widget: Widget,
pub required: bool,
pub default_json: Option<&'static str>,
pub format: Option<&'static str>,
pub enum_values: Option<&'static [&'static str]>,
pub items_type: Option<FieldType>,
pub one_of_members: Option<&'static [BuiltinField]>,
pub description: &'static str,
pub label: Option<&'static str>,
pub priority: u8,
pub skip_schema: bool,
pub group: &'static str,
}Expand description
A builtin frontmatter field definition.
Each entry describes a field that moss recognizes in markdown frontmatter.
The schema::builtin_schema() function reads this table to produce the
ContentSchema returned to the editor and validation engine.
Fields§
§name: &'static strField name as it appears in YAML frontmatter.
field_type: FieldTypeData type of the field.
widget: WidgetUI widget hint for the editor form.
required: boolWhether the field is required.
default_json: Option<&'static str>Default value as a JSON literal (e.g. "true", "\"list\"", "1").
format: Option<&'static str>Format hint (e.g. "date" for YYYY-MM-DD validation).
enum_values: Option<&'static [&'static str]>Allowed values for select/enum fields.
items_type: Option<FieldType>Item type for array fields (e.g. FieldType::String for tags: [...]).
one_of_members: Option<&'static [BuiltinField]>Member variants for a OneOf union field. Each member is itself a
BuiltinField (scalar field_type/widget — const-legal). Set only for
union fields (children, series); builtin_schema() recursively
materializes these into the owned FieldDefinition::one_of.
description: &'static strHuman-readable description shown in the editor form.
label: Option<&'static str>Optional human-readable label for the chip bar. When None, the frontend
falls back to using the field key. Useful for fields with unfriendly
internal names (e.g. children_depth → “Depth”).
priority: u8Display priority for chip bar ordering. Lower values appear first. 0 means unset (skip-schema fields). Typical range: 10 (title) to 110 (cascade).
skip_schema: boolIf true, the field exists in the FrontMatter struct but is NOT
exposed in the editor schema or validation. Used for site-level config,
auto-generated fields, and fields migrating to plugin-contributed schemas.
The field name IS surfaced to the frontend via
FrontmatterSchema::internal_fields (populated by builtin_schema()),
so the chip bar can filter these out of its render list without a
hand-maintained denylist. Adding a new skip_schema: true field here
is sufficient — no TS-side edit needed.
group: &'static strUI group for the add-property dropdown. Fields with the same group are displayed together. Empty string for skip_schema fields.