0.0.0 • Published 10 years ago

rosh-template v0.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
10 years ago

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});