mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 05:31:41 +00:00
update
This commit is contained in:
12
node_modules/liquidjs/demo/nodejs/index.js
generated
vendored
Normal file
12
node_modules/liquidjs/demo/nodejs/index.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
const Liquid = require('liquidjs')
|
||||
|
||||
const engine = new Liquid({
|
||||
root: __dirname,
|
||||
extname: '.liquid'
|
||||
})
|
||||
const ctx = {
|
||||
todos: ['fork and clone', 'make it better', 'make a pull request'],
|
||||
title: 'Welcome to liquidjs!'
|
||||
}
|
||||
|
||||
engine.renderFile('todolist', ctx).then(console.log)
|
5
node_modules/liquidjs/demo/nodejs/todolist.liquid
generated
vendored
Normal file
5
node_modules/liquidjs/demo/nodejs/todolist.liquid
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<ul>
|
||||
{% for todo in todos %}
|
||||
<li>{{forloop.index}} - {{todo}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
Reference in New Issue
Block a user