Skip to content

Instantly share code, notes, and snippets.

@arkitrave
Created February 14, 2011 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arkitrave/826350 to your computer and use it in GitHub Desktop.
Save arkitrave/826350 to your computer and use it in GitHub Desktop.
Step One
handlebars : {
cache: [],
render : function (name, template, content, context, callback) {
try {
if (!cache[name]) {
cache[name] = Handlebars.compile(template);
}
callback(cache[name](content, context));
} catch (e) {
// console.log('Could not render. Handlebars might not be installed');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment