serum v1.0.0 Serum.Post

Defines a struct representing a blog post page.

Fields

  • file: Source path
  • title: Post title
  • date: Post date (formatted)
  • raw_date: Post date (erlang tuple style)
  • tags: A list of tags
  • url: Absolute URL of the blog post in the website
  • html: Post contents converted into HTML
  • preview: Preview text of the post
  • output: Destination path

Link to this section Summary

Link to this section Types

Link to this type

t()
t() :: %Serum.Post{
  date: binary(),
  file: binary(),
  html: binary(),
  output: binary(),
  preview: binary(),
  raw_date: {:calendar.date(), :calendar.time()},
  tags: [Serum.Tag.t()],
  title: binary(),
  url: binary()
}

Link to this section Functions

Link to this function

compact(post)
compact(t()) :: map()

Link to this function

new(path, header, html, proj)
new(binary(), map(), binary(), map()) :: t()

Link to this function

to_fragment(post, templates, proj)
to_fragment(t(), map(), Project.t()) :: Serum.Result.t(Serum.Fragment.t())