PhoenixKit. Modules. Publishing. PublishingGroup
(PhoenixKitPublishing v0.4.4)
Copy Markdown
View Source
Schema for publishing groups (blog, faq, legal, etc.).
Each group contains posts and defines the content mode (timestamp or slug).
Extensible settings are stored in the data JSONB column.
Data JSONB Keys
type- Group type: "blog", "faq", "legal", or "custom"item_singular- Display name for single item (e.g., "Post", "Article")item_plural- Display name for multiple items (e.g., "Posts", "Articles")description- Group descriptionicon- Heroicon name for admin UIsettings- Group-specific settings mapcomments_enabled- Whether comments are enabled for this grouplikes_enabled- Whether likes are enabled for this groupviews_enabled- Whether view tracking is enabled for this groupfeatured_enabled- Whether featured posts are surfaced on this group's public listing (defaulttrue). Whenfalse, posts flagged featured render inline like any other post — no hero band, no pinning.featured_layout- How featured posts render:"hero"(a band above the grid) or"card"(a larger card within the grid). Default"hero".newest_enabled- Whether the most recent post is pulled out of the grid into its own "Latest" band under any featured posts and shown larger (defaultfalse).newest_layout- How the latest post renders:"hero"(a band above the grid) or"card"(a larger card within the grid). Default"hero".featured_style- The paint of featured-band cards, orthogonal to the layout:"classic","cover","cover_panel","minimal", or"top". Default"classic".newest_style- Same vocabulary for the Latest band. Default"classic".scrollbar_style- Native scrollbar styling for this group's public pages:"default"(untouched),"branded"(theme-colored), or"thin". Never replaces native scroll — only recolors/resizes the real bar. Default"default".scroll_progress_enabled- Show a reading-progress bar on post pages (defaultfalse).scroll_headings_enabled- Show a heading-anchor rail on post pages (defaultfalse).scroll_timeline_enabled- Show a date-timeline rail on the listing (defaultfalse).scroll_timeline_granularity- Timeline marker resolution:"auto"(fit to the posts' date span),"year","month", or"day". Default"auto".listing_sort- Public listing order:"newest"or"oldest"by effective publish date (post date for timestamp groups, published-at for slug groups). Default"newest".show_breadcrumbs- Show the breadcrumb trail on this group's public listing and post pages (defaultfalse).post_date_position- Where a post's date renders relative to the title on the post page:"above","below", or"hidden". Default"below".post_width- Post-page content column width:"narrow","normal", or"wide". Default"normal".show_featured_image- Show the post's featured image at the top of the post page (defaultfalse).show_reading_time- Show an estimated reading time on the post page (defaultfalse).show_tags- Show the post's tags on the post page (defaultfalse).show_post_count- Show the total post count under the title on the group's public listing (defaultfalse).show_top_back_link- Show the subtle "Back to <group>" link at the top of the post page, mirroring the footer button (defaulttrue).listing_image_links- Make the post-card images on the public listing click through to the post, same as the title (defaulttrue).listing_animations- Hover animations on listing cards (a subtle lift + shadow cue that the card is clickable; defaulttrue). Motion-reduce users never see the lift regardless.name_i18n- Per-language overrides for the group's display name, keyed by language code (e.g.%{"et" => "Blogi"}). The primary-language name lives in thenamecolumn; secondary languages fall back to it when absent. The slug is intentionally NOT translated — it stays a single canonical URL segment.
Summary
Functions
Changeset for creating or updating a publishing group.
Returns whether comments are enabled for this group.
Returns whether featured posts are surfaced on this group's listing (default true).
Returns the featured-post layout for this group ("hero" or "card"; default "hero").
Returns the featured-band style ("classic"/"cover"/"cover_panel"/"minimal"/"top"; default "classic").
Returns the group description.
Returns the group icon name.
Returns the plural item name (e.g., 'Posts').
Returns the singular item name (e.g., 'Post').
Returns the group type from data (blog/faq/legal/custom).
Returns whether likes are enabled for this group.
Returns whether listing cards animate on hover (default true).
Returns whether listing card images click through to the post (default true).
Returns the public-listing sort order for this group ("newest"/"oldest"; default "newest").
Returns the per-language display-name overrides map (language code => name).
Returns whether the latest post is surfaced in its own listing band (default false).
Returns the latest-post layout for this group ("hero" or "card"; default "hero").
Returns the Latest-band style (same vocabulary as featured_style; default "classic").
Returns where a post's date renders relative to the title ("above"/"below"/"hidden"; default "below").
Returns the post-page content width ("narrow"/"normal"/"wide"; default "normal").
Returns whether the heading-anchor rail shows on this group's post pages (default false).
Returns whether the reading-progress bar shows on this group's post pages (default false).
Returns whether the date-timeline rail shows on this group's listing page (default false).
Returns the date-timeline granularity ("auto"/"year"/"month"/"day"; default "auto").
Returns the scrollbar style for this group's public pages ("default"/"branded"/"thin").
Returns whether the breadcrumb trail shows on this group's public pages (default false).
Returns whether a post's featured image shows at the top of the post page (default false).
Returns whether the post count shows on the group's public listing (default false).
Returns whether an estimated reading time shows on the post page (default false).
Returns whether a post's tags show on the post page (default false).
Returns whether the top back link shows on the post page (default true).
Returns the group's display name in lang, falling back to the primary-language
name column when there's no translation for that language.
Returns whether view tracking is enabled for this group.
Types
@type t() :: %PhoenixKit.Modules.Publishing.PublishingGroup{ __meta__: term(), data: map(), description_i18n: term(), inserted_at: DateTime.t() | nil, mode: String.t(), name: String.t(), position: integer(), posts: term(), slug: String.t(), status: String.t(), title_i18n: term(), updated_at: DateTime.t() | nil, uuid: UUIDv7.t() | nil }
Functions
Changeset for creating or updating a publishing group.
Returns whether comments are enabled for this group.
Returns whether featured posts are surfaced on this group's listing (default true).
Returns the featured-post layout for this group ("hero" or "card"; default "hero").
Returns the featured-band style ("classic"/"cover"/"cover_panel"/"minimal"/"top"; default "classic").
Returns the group description.
Returns the group icon name.
Returns the plural item name (e.g., 'Posts').
Returns the singular item name (e.g., 'Post').
Returns the group type from data (blog/faq/legal/custom).
Returns whether likes are enabled for this group.
Returns whether listing cards animate on hover (default true).
Returns whether listing card images click through to the post (default true).
Returns the public-listing sort order for this group ("newest"/"oldest"; default "newest").
Returns the per-language display-name overrides map (language code => name).
Returns whether the latest post is surfaced in its own listing band (default false).
Returns the latest-post layout for this group ("hero" or "card"; default "hero").
Returns the Latest-band style (same vocabulary as featured_style; default "classic").
Returns where a post's date renders relative to the title ("above"/"below"/"hidden"; default "below").
Returns the post-page content width ("narrow"/"normal"/"wide"; default "normal").
Returns whether the heading-anchor rail shows on this group's post pages (default false).
Returns whether the reading-progress bar shows on this group's post pages (default false).
Returns whether the date-timeline rail shows on this group's listing page (default false).
Returns the date-timeline granularity ("auto"/"year"/"month"/"day"; default "auto").
Returns the scrollbar style for this group's public pages ("default"/"branded"/"thin").
Returns whether the breadcrumb trail shows on this group's public pages (default false).
Returns whether a post's featured image shows at the top of the post page (default false).
Returns whether the post count shows on the group's public listing (default false).
Returns whether an estimated reading time shows on the post page (default false).
Returns whether a post's tags show on the post page (default false).
Returns whether the top back link shows on the post page (default true).
Returns the group's display name in lang, falling back to the primary-language
name column when there's no translation for that language.
Matching is base-language tolerant: the admin form stores overrides under the
full language code (e.g. "fr-FR") while the public side resolves by the short
code ("fr"), so a lookup succeeds when either side uses the full or short form
(as long as the base is unambiguous).
Returns whether view tracking is enabled for this group.