mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
update README
This commit is contained in:
@@ -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
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user