Serum.Post (serum v1.5.1) View Source

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

Specs

t() :: %Serum.Post{
  date: binary(),
  extras: map(),
  file: binary(),
  html: binary(),
  output: binary(),
  preview: binary(),
  raw_date: :calendar.datetime(),
  tags: [Serum.Tag.t()],
  template: binary() | nil,
  title: binary(),
  url: binary()
}

Link to this section Functions

Specs

compact(t()) :: map()
Link to this function

new(path, arg, html, proj)

View Source

Specs

new(binary(), {map(), map()}, binary(), Serum.Project.t()) :: t()

Specs

to_fragment(t()) :: Serum.Result.t(Serum.Fragment.t())