View Source Serum.Post (serum_md v1.6.0)

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
  • canonical_url: Custom canonical URL of the blog post
  • html: Post contents converted into HTML
  • preview: Preview text of the post
  • output: Destination path

Summary

Types

@type t() :: %Serum.Post{
  canonical_url: binary(),
  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()
}

Functions

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

new(path, arg, html, proj)

View Source
@spec new(binary(), {map(), map()}, binary(), Serum.Project.t()) :: t()
@spec to_fragment(t()) :: Serum.Result.t(Serum.Fragment.t())