Liquid 


It's a templating library for Elixir. Continuation of the fluid liquid conversion.
Usage
Add the dependency to your mix file:
# mix.exs
defp deps do
[…,
{:liquid, "~> 0.1.0"}]
endYou can either start the application directly:
Liquid.start
Or start it with your application:
# mix.exs
def application do
[mod: {MyApp, []},
applications: […, :liquid]]
endCompile a template from a string:
template = Liquid.Template.parse("{% assign hello='hello' %}{{ hello }}{{world}}")
Render the template with a keyword list representing the local variables:
{ :ok, rendered, _ } = Liquid.Template.render(template, [world: "world"])
The tests should give a pretty good idea of the features implemented so far.
Missing Features
Feel free to add a bug report or pull request if you feel that anything is missing.
todo
- Add full set of filters
- Add ability to add custom filters
- Add ability to add custom tags
- Implement capture
- Implement table_row tag
- Fix empty check on arrays