View Source Serum.Page (serum_md v1.6.2)

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

Summary

Types

@type t() :: %Serum.Page{
  data: binary(),
  extras: map(),
  file: binary(),
  group: binary(),
  label: binary(),
  order: integer(),
  output: binary(),
  template: binary() | nil,
  title: binary(),
  type: binary(),
  url: binary()
}

Functions

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

new(path, arg, data, proj)

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