Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 353 Bytes

.verb.md

File metadata and controls

18 lines (14 loc) · 353 Bytes

Usage

Example for handlebars, but this should work for any template engine that takes helpers or filters.

var handlebars = require('handlebars');
handlebars.registerHelper('gradient', require('{%= name %}'));

Then use in your templates like this:

<style>
  .page-header { 
    {{gradient "Man of steel"}}
  }
</style>