solid v0.3.0 Solid

Main module to interact with Solid

iex> Solid.parse("{{ variable }}") |> elem(1) |> Solid.render(%{ "variable" => "value" }) |> to_string "value"

Link to this section Summary

Functions

It generates the compiled template

It generates the compiled template

It renders the compiled template using a hash with vars

Link to this section Functions

Link to this function

parse(text)

parse(String.t()) ::
  {:ok, %Solid.Template{parsed_template: term()}}
  | {:error,
     %Solid.TemplateError{
       __exception__: term(),
       line: term(),
       message: term(),
       reason: term()
     }}

It generates the compiled template

Link to this function

parse!(text)

parse!(String.t()) :: %Solid.Template{parsed_template: term()} | no_return()

It generates the compiled template

Link to this function

render(text, hash)

It renders the compiled template using a hash with vars