Removed example because it doesn't render right here on the new wiki :/

Updated Home (textile)
tobi
2010-08-22 14:02:42 -07:00
parent ccf221efdf
commit 4b524f2e3b
-17
@@ -4,23 +4,6 @@ Liquid is a template engine which was crafted for very specific requirements
* It needs to be non-evaling and secure. Liquid templates are made so that users can edit them. You don't want to run code on your server which your users wrote.
* It has to be stateless. The compile and render steps have to be separate, so that the expensive parsing and compiling can be done once; later on, you can just render it by passing in a hash with local variables and objects.
* It needs to be able to style emails as well as HTML.
h2. What does it look like?
source = %|
<ul id="products">
{% for product in products %}
<li>
<h2>{{product.name}}</h2>
Only {{product.price | price }}
{{product.description | textile }}
</li>
{% endfor %}
</ul>|
@template = Liquid::Template.parse(source)
@template.render( 'products' => Product.all )
h2. Stuff to read, watch, etc.