Created
February 9, 2019 07:42
-
-
Save mattsan/47dfee2a773cb2c233454065a404bd36 to your computer and use it in GitHub Desktop.
A sample of liquid in Elixir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:ok, greeting, _} = | |
"{{ greeting | capitalize }}, {{ greeting | downcase }}!" | |
|> Liquid.Template.parse() | |
|> Liquid.Template.render(%{"greeting" => "HELLO"}) | |
IO.puts(greeting) | |
# => Hello, hello! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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