Sayfa.Content.Raw (Sayfa v0.5.0)

Copy Markdown View Source

Intermediate representation of parsed content before Markdown rendering.

This struct holds the raw data extracted from a content file: the file path, parsed YAML front matter, and the unparsed Markdown body. It is used as an intermediate step before transforming into Sayfa.Content.

Examples

%Sayfa.Content.Raw{
  path: "content/articles/2024-01-15-hello.md",
  front_matter: %{"title" => "Hello", "date" => ~D[2024-01-15]},
  body_markdown: "# Hello World\n\nContent here.",
  filename: "2024-01-15-hello.md"
}

Summary

Types

t()

@type t() :: %Sayfa.Content.Raw{
  body_markdown: String.t(),
  filename: String.t() | nil,
  front_matter: map(),
  path: String.t()
}