Liquid Markup Tutorial

Liquid Markup is a way to build safe web page templates which protect the security of the web server.

See http://www.liquidmarkup.org/

What does it look like?

  My name is {{ user.name }}

Liquid Markup has loops:

  {% for user in users %}
     My name is {{ user.name }}
  {% endfor %}

Liquid Markup has if/then/else conditionals:

  {% if user.name == 'Alice' %}
     This is text is just for Alice.
  {% else %}
     This is text is for everyone else.
  {% endif %}

Liquid Markup can use any HTML tags:

  My web page is %gt;a href="{{ user.url }}"%lt;here

Liquid Markup has filters for common needs:

  My lunch costs {{lunch.price | format_as_money }}



What's Next?

blog comments powered by Disqus