Metatags (metatags v0.6.0)

View Source

Metatags is used to provide an easy API to print out context-specific metatags.

Summary

Functions

Turns metadata information into HTML tags

Puts a key and a value in the on a the a struct adhering to the Metatags.Transport protocol.

Types

metatag_value()

@type metatag_value() ::
  String.t() | [String.t()] | {String.t(), Keyword.t()} | map() | nil

Functions

init(transport, config)

See Metatags.Transport.init/2.

put(transport, key, value)

@spec put(struct(), String.t() | atom(), metatag_value()) :: struct()

Puts a key and a value in the on a the a struct adhering to the Metatags.Transport protocol.

Example:

iex> conn = %Conn{} iex> Metatags.put(conn, "title", "Welcome!") %Conn{private: %{metadata: %{"title" => "Welcome!"}}}

put(conn, key, value, extra_attributes)

@spec put(struct(), String.t() | atom(), metatag_value(), Keyword.t()) :: struct()