View Source Metatags (metatags v0.5.0)

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 %Conn{} struct

Types

metatag_value()

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

Functions

put(conn, key, value)

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

Puts a key and a value in the on a %Conn{} struct

example:

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

put(conn, key, value, extra_attributes)

@spec put(Plug.Conn.t(), String.t(), metatag_value(), Keyword.t()) :: struct()