PhoenixKitWeb.Live.Modules.Blogging.Metadata (phoenix_kit v1.5.1)
View SourceMetadata helpers for .phk (PhoenixKit) blogging posts.
Metadata is stored as a simple key-value format at the top of the file:
---
slug: home
title: Welcome
status: published
published_at: 2025-10-29T18:48:00Z
---
Content goes here...
Summary
Functions
Returns default metadata for a new post.
Parses .phk content, extracting metadata from frontmatter and returning the content.
Serializes metadata as YAML-style frontmatter.
Types
@type metadata() :: %{ status: String.t(), title: String.t(), description: String.t() | nil, slug: String.t(), published_at: String.t(), created_at: String.t() | nil, created_by_id: String.t() | nil, created_by_email: String.t() | nil, updated_by_id: String.t() | nil, updated_by_email: String.t() | nil }
Functions
@spec default_metadata() :: metadata()
Returns default metadata for a new post.
Parses .phk content, extracting metadata from frontmatter and returning the content.
Serializes metadata as YAML-style frontmatter.