Publishing source for sitemap generation.
Collects published posts from the PhoenixKit Publishing system. Includes both group listing pages and individual post pages.
URL Structure
Uses PhoenixKit URL prefix from config:
- Group listing:
/{prefix}/{group_slug}(default language) - Group listing:
/{prefix}/{lang}/{group_slug}(non-default language)
For slug mode posts:
/{prefix}/{group_slug}/{post_slug}(default language)/{prefix}/{lang}/{group_slug}/{post_slug}(non-default language)
For timestamp mode posts:
- Single post on date:
/{prefix}/{group_slug}/{date}(e.g., /blog/2025-12-09) - Multiple posts on date:
/{prefix}/{group_slug}/{date}/{time}(e.g., /blog/2025-12-09/16:26)
Exclusion
Posts can be excluded by setting post.metadata.sitemap_exclude = true.
Sitemap Properties
Group listings:
- Priority: 0.7
- Change frequency: daily
- Category: Group name
Individual posts:
- Priority: 0.8
- Change frequency: weekly
- Category: Group name
- Last modified: Post's date_updated or timestamp
Summary
Functions
Max post lastmod across all included groups, using the default language.
When sitemap_publishing_split_by_group is enabled, returns per-group sub-sitemaps.
Otherwise returns nil (single file).
Functions
@spec latest_post_date_global() :: Date.t() | nil
Max post lastmod across all included groups, using the default language.
Drives the homepage <lastmod> from Sources.Static. Equivalent to taking
max(:lastmod) across collect/1's URL entries, but skips the URL-entry
construction work. One list_posts/2 call per included group instead of
three (as in collect/1).
When sitemap_publishing_split_by_group is enabled, returns per-group sub-sitemaps.
Otherwise returns nil (single file).