// 01
Content model
- "Lect" structured content — every page's body is a JSON document with a defined shape: localized fields, scalar attributes (
@), page-reference pointers (*), repeatable items, reusable blocks (_blocks), and tags (_tags). Metadata like_type,_modifier, and_pointerslive alongside. - Blueprint-driven schema — page types are declared as blueprints (a mix of field strings and nested item maps); the editor form, search paths, and CSV headers are all derived from the same blueprint.
- Built-in multilingual support — default language set (
mis,en,zh-hant,zh-hans) with per-field localized values; language is chosen per request and threaded through save/reload. A Languages admin manages locales, fallback order and content/UI enablement, while Translations stores per-locale UI overrides; the complete admin shell and profile language selector use those runtime translations. - 21 field types rendered from Liquid snippets:
text,textarea,richtext,number,boolean,switch,checkbox,radio,select,date,time,color,email,tel,url,link,page(page-reference combobox),picture,file(private media uploads),range(labelled discrete scales), andrating(keyboard-accessible stars). - Markdown rich-text mode — the
richtext/mdfield keeps a visual rich-text surface, Markdown source and submitted HTML synchronized. It is now the default body field for pages and blocks, with translated mode controls and recovery for legacy double-escaped HTML. - Translation-aware field chrome — shared
text,email,number,textarea,picture,select, andswitchsnippets can resolve labels, placeholders, blank labels, and select options from i18n keys, with plain-text fallbacks for existing blueprints. - Page-reference fields — a searchable combobox backed by a JSON API to link one page to another (by type, filtered by name/slug).
- Page hierarchy — pages can have a parent (
page_id), forming trees; parent options are searchable. - Scheduling window & timezone — every page carries optional
start/endtimestamps with a timezone (UTC offset or IANA name; default configurable viaDEFAULT_TIMEZONE). - Weight ordering — manual sort weight per page, editable inline and via a batch endpoint; client-rendered item groups also offer drag handles that update their ordinary weight inputs before save.
- Legacy-format normalization — older "structured" JSON shapes are auto-migrated to the current lect model on read.
- Lect merge semantics — blueprint defaults ← stored content ← incoming partial, so API callers and importers can send only the fields they changed.