Publishing module for managing content groups and their posts.
Database-backed CMS for creating timestamped or slug-based posts with multi-language support and versioning.
This module acts as a facade, delegating to focused submodules:
Publishing.Groups— Group CRUDPublishing.Posts— Post CRUD, reading, and listingPublishing.Versions— Version create, publish, deletePublishing.TranslationManager— Language/translation managementPublishing.StaleFixer— Stale value detection and repair
Summary
Functions
Returns true when the given post is a DB-backed post (has a UUID).
Resolves a variable name from og_variables/0 against the current
post supplied in context.resource. Falls back to nil for unknown
names so unwired slots stay visible rather than blowing up.
Variables this module makes available for OG template wiring. Each
entry declares its type (:text / :image), which lets the OG
assignment UI show only compatible variables for a given slot.
Dynamic children function for Publishing sidebar tabs.
Stub: always returns false. Versioning is opt-in via the editor's
explicit "create new version" action, not implicit on every save —
so this predicate is intentionally a no-op kept for API stability
with older callers that branch on it.
Returns true when slugifying text would be shortened to fit the slug cap —
i.e. the full title didn't fit. Auto-generation never errors (it truncates);
this lets the editor warn that not all of the title became the slug.
Lowercases name, replaces non-alphanumeric runs with -, and trims
leading/trailing hyphens. Pairs with valid_slug?/1 — callers should
re-validate the result because slug-shape is enforced separately from
generation (reserved language codes, empty results).
Returns true when the slug matches the allowed lowercase letters, numbers, and hyphen pattern, and is not a reserved language code.
Functions
See PhoenixKit.Modules.Publishing.TranslationManager.add_language_to_post/4.
See PhoenixKit.Modules.Publishing.TranslationManager.add_language_to_post/5.
See PhoenixKit.Modules.Publishing.TranslationManager.clear_translation/4.
See PhoenixKit.Modules.Publishing.TranslationManager.clear_translation/5.
See PhoenixKit.Modules.Publishing.DBStorage.clear_url_slug_from_post/3.
See PhoenixKit.Modules.Publishing.Posts.count_posts_on_date/2.
See PhoenixKit.Modules.Publishing.Versions.create_new_version/4.
See PhoenixKit.Modules.Publishing.Versions.create_version_from/5.
Returns true when the given post is a DB-backed post (has a UUID).
See PhoenixKit.Modules.Publishing.LanguageHelpers.default_language_no_prefix?/0.
See PhoenixKit.Modules.Publishing.TranslationManager.delete_language/4.
See PhoenixKit.Modules.Publishing.TranslationManager.delete_language/5.
See PhoenixKit.Modules.Publishing.Versions.delete_version/3.
See PhoenixKit.Modules.Publishing.Versions.delete_version/4.
See PhoenixKit.Modules.Publishing.LanguageHelpers.enabled_language_codes/0.
See PhoenixKit.Modules.Publishing.Posts.extract_slug_version_and_language/2.
See PhoenixKit.Modules.Publishing.Posts.find_by_previous_url_slug/3.
See PhoenixKit.Modules.Publishing.ListingCache.find_post_by_path/3.
See PhoenixKit.Modules.Publishing.StaleFixer.fix_all_stale_values/0.
See PhoenixKit.Modules.Publishing.StaleFixer.fix_stale_content/1.
See PhoenixKit.Modules.Publishing.StaleFixer.fix_stale_group/1.
See PhoenixKit.Modules.Publishing.StaleFixer.fix_stale_post/1.
See PhoenixKit.Modules.Publishing.StaleFixer.fix_stale_version/1.
See PhoenixKit.Modules.Publishing.SlugHelpers.generate_unique_slug/2.
See PhoenixKit.Modules.Publishing.SlugHelpers.generate_unique_slug/3.
See PhoenixKit.Modules.Publishing.SlugHelpers.generate_unique_slug/4.
See PhoenixKit.Modules.Publishing.LanguageHelpers.get_display_code/2.
See PhoenixKit.Modules.Publishing.LanguageHelpers.get_language_info/1.
See PhoenixKit.Modules.Publishing.LanguageHelpers.get_primary_language/0.
See PhoenixKit.Modules.Publishing.LanguageHelpers.get_primary_language_base/0.
See PhoenixKit.Modules.Publishing.Versions.get_published_version/2.
See PhoenixKit.Modules.Publishing.Versions.get_version_metadata/4.
See PhoenixKit.Modules.Publishing.Versions.get_version_status/4.
See PhoenixKit.Modules.Publishing.ListingCache.invalidate/1.
See PhoenixKit.Modules.Publishing.LanguageHelpers.language_enabled?/2.
See PhoenixKit.Modules.Publishing.Posts.list_posts_by_status/2.
See PhoenixKit.Modules.Publishing.Posts.list_times_on_date/2.
See PhoenixKit.Modules.Publishing.Groups.list_trashed_groups/0.
Resolves a variable name from og_variables/0 against the current
post supplied in context.resource. Falls back to nil for unknown
names so unwired slots stay visible rather than blowing up.
Variables this module makes available for OG template wiring. Each
entry declares its type (:text / :image), which lets the OG
assignment UI show only compatible variables for a given slot.
See PhoenixKit.Modules.Publishing.LanguageHelpers.order_languages_for_display/2.
See PhoenixKit.Modules.Publishing.LanguageHelpers.order_languages_for_display/3.
See PhoenixKit.Modules.Publishing.Versions.publish_version/4.
Dynamic children function for Publishing sidebar tabs.
See PhoenixKit.Modules.Publishing.DBStorage.read_post_by_datetime/3.
See PhoenixKit.Modules.Publishing.Posts.read_post_by_uuid/3.
See PhoenixKit.Modules.Publishing.StaleFixer.reconcile_post_status/1.
See PhoenixKit.Modules.Publishing.ListingCache.regenerate/1.
See PhoenixKit.Modules.Publishing.TranslationManager.set_translation_status/5.
Stub: always returns false. Versioning is opt-in via the editor's
explicit "create new version" action, not implicit on every save —
so this predicate is intentionally a no-op kept for API stability
with older callers that branch on it.
See PhoenixKit.Modules.Publishing.SlugHelpers.slug_exists?/2.
Returns true when slugifying text would be shortened to fit the slug cap —
i.e. the full title didn't fit. Auto-generation never errors (it truncates);
this lets the editor warn that not all of the title became the slug.
Lowercases name, replaces non-alphanumeric runs with -, and trims
leading/trailing hyphens. Pairs with valid_slug?/1 — callers should
re-validate the result because slug-shape is enforced separately from
generation (reserved language codes, empty results).
Examples
iex> PhoenixKit.Modules.Publishing.slugify("My First Post!")
"my-first-post"
iex> PhoenixKit.Modules.Publishing.slugify(" spaces & ampersands ")
"spaces-ampersands"
See PhoenixKit.Modules.Publishing.TranslationManager.translate_post_to_all_languages/3.
See PhoenixKit.Modules.Publishing.Versions.unpublish_post/3.
See PhoenixKit.Modules.Publishing.LanguageHelpers.url_language_code/1.
See PhoenixKit.Modules.Publishing.LanguageHelpers.use_language_prefix?/1.
Returns true when the slug matches the allowed lowercase letters, numbers, and hyphen pattern, and is not a reserved language code.
Group slugs cannot be language codes (like 'en', 'es', 'fr') to prevent routing ambiguity.
See PhoenixKit.Modules.Publishing.SlugHelpers.validate_slug/1.
See PhoenixKit.Modules.Publishing.SlugHelpers.validate_url_slug/4.