serum v1.2.0 Serum.Page View Source

Defines a struct describing a normal page.

Fields

  • file: Source path
  • type: Type of source file
  • title: Page title
  • label: Page label
  • group: A group the page belongs to
  • order: Order of the page within its group
  • url: Absolute URL of the page within the website
  • output: Destination path
  • data: Source data

Link to this section Summary

Link to this section Types

Link to this type

t()

View Source
t() :: %Serum.Page{
  data: binary(),
  extras: %{optional(binary()) => binary()},
  file: binary(),
  group: binary(),
  label: binary(),
  order: integer(),
  output: binary(),
  template: binary(),
  title: binary(),
  type: binary(),
  url: binary()
}

Link to this section Functions

Link to this function

compact(page)

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

new(path, header, data, proj)

View Source
new(binary(), map(), binary(), map()) :: t()
Link to this function

to_fragment(page, templates)

View Source
to_fragment(t(), map()) :: Serum.Result.t(Serum.Fragment.t())