rosh-template
v0.0.0
Published
Really simple template engine
Downloads
1
Readme
rosh-template
A really simple template engine for node.js
##Example Template:
<body>
@insert(./topbar.html)
@for(post in posts){
<div class="line">
<div class="post">
<div class="date">@(post.date) on @(post.section)</div>
<a href="post/@(post.url)"><div class="title">@(post.title)</div></a>
<div class="description">@(post.description)</div>
</div>
</div>
}
</body>
Node.js script
var templating = require("rosh-template");
var index = templating.prepare("index.html");
var rendered = index.render({posts: postsList});