Solid is an implementation in Elixir of the template engine Liquid. It uses nimble_parsec to generate the parser.
iex> template = "My name is {{ user.name }}"
iex> {:ok, template} = Solid.parse(template)
iex> Solid.render(template, %{ "user" => %{ "name" => "José" } }) |> to_string
"My name is José"
The package can be installed with:
def deps do
[{:solid, "~> 0.8"}]
end
When adding new functionality or fixing bugs consider adding a new test case here inside test/cases
. These cases are tested against the Ruby gem so we can try to stay as close as possible to the original implementation.