Centralized constants for the Publishing module.
Provides canonical lists for statuses, modes, and types used across schemas, business logic, and templates. Import or alias this module instead of hardcoding these values inline.
For guard clauses and pattern matches, use the module attributes:
@timestamp_modes Publishing.Constants.timestamp_modes()
@slug_modes Publishing.Constants.slug_modes()
def my_func(mode) when mode in @timestamp_modes do ...
Summary
Functions
Valid version and content statuses: draft, published, archived.
Default group mode.
Default title for posts without a title.
Default group type.
Valid group statuses: active, trashed.
Max length for group names.
Max length for group slugs.
Max length for language codes.
Max length for post/content slugs.
Max length for content titles.
Valid post statuses: draft, published, archived, trashed.
Preset group types (shown as radio buttons in UI).
Returns true if mode is a slug mode (atom or string).
Atom and string variants for slug mode — use in guards/pattern matches.
Returns true if mode is a timestamp mode (atom or string).
Atom and string variants for timestamp mode — use in guards/pattern matches.
Valid mode strings for schema validation.
All valid group types including custom.
Functions
Valid version and content statuses: draft, published, archived.
Default group mode.
Default title for posts without a title.
Default group type.
Valid group statuses: active, trashed.
Max length for group names.
Max length for group slugs.
Max length for language codes.
Max length for post/content slugs.
Max length for content titles.
Valid post statuses: draft, published, archived, trashed.
Preset group types (shown as radio buttons in UI).
Returns true if mode is a slug mode (atom or string).
Atom and string variants for slug mode — use in guards/pattern matches.
Returns true if mode is a timestamp mode (atom or string).
Atom and string variants for timestamp mode — use in guards/pattern matches.
Valid mode strings for schema validation.
All valid group types including custom.