Skip to content

Instantly share code, notes, and snippets.

@mattsan
Created February 9, 2019 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattsan/47dfee2a773cb2c233454065a404bd36 to your computer and use it in GitHub Desktop.
Save mattsan/47dfee2a773cb2c233454065a404bd36 to your computer and use it in GitHub Desktop.
A sample of liquid in Elixir
{:ok, greeting, _} =
"{{ greeting | capitalize }}, {{ greeting | downcase }}!"
|> Liquid.Template.parse()
|> Liquid.Template.render(%{"greeting" => "HELLO"})
IO.puts(greeting)
# => Hello, hello!
defp deps do
[
{:liquid, "~> 0.9.1"}
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment