Merge pull request #62 from rmetzler/master

code blocks in README.md displayed properly on github (closes #61)
This commit is contained in:
Jonathan Rudenberg
2011-06-19 20:48:03 -07:00

View File

@@ -18,7 +18,7 @@ Liquid is a template engine which I wrote for very specific requirements
## What does it look like?
<code>
```html
<ul id="products">
{% for product in products %}
<li>
@@ -29,14 +29,14 @@ Liquid is a template engine which I wrote for very specific requirements
</li>
{% endfor %}
</ul>
</code>
```
## Howto use Liquid
Liquid supports a very simple API based around the Liquid::Template class.
For standard use you can just pass it the content of a file and call render with a parameters hash.
<pre>
```ruby
@template = Liquid::Template.parse("hi {{name}}") # Parses and compiles the template
@template.render( 'name' => 'tobi' ) # => "hi tobi"
</pre>
```