README
TrueRender
Part of TruePage package
Fancy features
- Render the handlebars templates and any REST APIs into static pages
Installation
npm install truerender
Example
var truerender = require('truerender');
var pages = [
{page:"index", template:__dirname+"/templates/index.html", data_urls: {page:"http://api.example.com/page/index", events:"http://api.example.com/events"}}
];
/*
Data from api will be available in template
ie. http://api.example.com/page/index will be available in {{page}}
*/
truerender.populateTemplate(pages[0], function(rendered_html){
// do stuff with rendered html
});
License
MIT