PhoenixKit.Modules.Publishing.PublishingContent (phoenix_kit v1.7.71)

Copy Markdown View Source

Schema for publishing content — one row per language per version.

Stores one content entry per language per version. Each content row has its own title, content body, status, and optional URL slug.

Data JSONB Keys

  • description - SEO meta description
  • previous_url_slugs - List of previous URL slugs for 301 redirects
  • featured_image_uuid - Per-language featured image override
  • seo_title - Custom SEO title (if different from title)
  • excerpt - Custom excerpt (if different from auto-generated)
  • custom_css - Per-language custom CSS
  • updated_by_uuid - UUID of last editor for this language

Summary

Functions

Changeset for creating or updating publishing content.

Returns the SEO description.

Returns the custom excerpt.

Returns the per-language featured image UUID.

Returns previous URL slugs for 301 redirects.

Returns the custom SEO title.

Returns the UUID of the last editor for this language.

Types

t()

@type t() :: %PhoenixKit.Modules.Publishing.PublishingContent{
  __meta__: term(),
  content: String.t() | nil,
  data: map(),
  inserted_at: DateTime.t() | nil,
  language: String.t(),
  status: String.t(),
  title: String.t(),
  updated_at: DateTime.t() | nil,
  url_slug: String.t() | nil,
  uuid: UUIDv7.t() | nil,
  version: term(),
  version_uuid: UUIDv7.t()
}

Functions

changeset(content, attrs)

Changeset for creating or updating publishing content.

get_description(publishing_content)

Returns the SEO description.

get_excerpt(publishing_content)

Returns the custom excerpt.

get_previous_url_slugs(publishing_content)

Returns previous URL slugs for 301 redirects.

get_seo_title(publishing_content)

Returns the custom SEO title.

get_updated_by_uuid(publishing_content)

Returns the UUID of the last editor for this language.