Last active
August 29, 2015 13:58
-
-
Save minwe/9952587 to your computer and use it in GitHub Desktop.
Handlebars script helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handlebars.registerHelper('script', function (src){ | |
var s = '<script src="' + src + '" type="text/javascript"><' + '/script>'; | |
return new Handlebars.SafeString(s); | |
}); | |
// usage: {{{script "https://gist.github.com/4332573.js"}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment