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 cache: false
}); });
// equivalent to: engine.renderFile("hello", {name: 'alice'}); // 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 `""`. `cache` default to `false`, `extname` default to `.liquid`, `root` default to `""`.
@@ -81,17 +81,17 @@ color: 'yellow' shape: 'square'
## Layouts ## Layouts
``` ```
// file: default-layout.html // file: default-layout.liquid
Header Header
{% block content %}My default content{% endblock %} {% block content %}My default content{% endblock %}
Footer Footer
// file: page.html // file: page.liquid
{% layout "default-layout" %} {% layout "default-layout" %}
{% block content %}My page content{% endblock %} {% block content %}My page content{% endblock %}
``` ```
The output of `page.html`: The output of `page.liquid`:
``` ```
Header Header
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "shopify-liquid", "name": "shopify-liquid",
"version": "1.1.6", "version": "1.1.7",
"description": "A Shopify Liquid Implementation in Node.js", "description": "A Shopify Liquid Implementation in Node.js",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {