update README

This commit is contained in:
harttle
2016-06-25 13:10:17 +08:00
parent 88b2dc3795
commit a0feabce5b
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -44,7 +44,7 @@ var engine = Liquid({
cache: false
});
// equivalent to: engine.renderFile("hello", {name: 'alice'});
var html = engine.renderFile("hello.html", {name: 'alice'});
var html = engine.renderFile("hello.liquid", {name: 'alice'});
```
`cache` default to `false`, `extname` default to `.liquid`, `root` default to `""`.
@@ -81,17 +81,17 @@ color: 'yellow' shape: 'square'
## Layouts
```
// file: default-layout.html
// file: default-layout.liquid
Header
{% block content %}My default content{% endblock %}
Footer
// file: page.html
// file: page.liquid
{% layout "default-layout" %}
{% block content %}My page content{% endblock %}
```
The output of `page.html`:
The output of `page.liquid`:
```
Header
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "shopify-liquid",
"version": "1.1.6",
"version": "1.1.7",
"description": "A Shopify Liquid Implementation in Node.js",
"main": "index.js",
"scripts": {