helper-process

{{process}} handlebars helper for processing raw templates in included content, with the correct context.

helper-process

{{process}} handlebars helper for processing raw templates in included content, with the correct context.

Install the helper with: npm install handlebars-helper-process --save

If you use Assemble and Grunt, you have some simple options for adding helpers.

Add handlebars-helper-process to the helpers property in the Assemble task or target options in your Gruntfile:

grunt.initConfig({
  assemble: {
    options: {
      // You may either register the helper this way. 
      helpers: ['handlebars-helper-process', 'foo/*.js']
    },
    files: {}
  }
});

Or, add the handlebars-helper-process module to both the devDependencies and the keywords array of your project's the package.json, enabling Assemble will automatically resolve the helper. Example:

{
  "name": "your-project",
  "dependencies": {
    "handlebars-helper-process": "*"
  },
  "keywords": [
    "handlebars-helper-process"
  ]
}

With that completed, you may now use the {{#process}} helper in your templates:

{{#each pages}}
  {{#isnt basename 'index'}}
    {{#process}}
      {{{page}}}
    {{/process}}
  {{/isnt}}
{{/each}}

Please report any bugs or feature requests, thanks!

Please see the Contributing to helper-process guide for information on contributing to this project.

Jon Schlinkert

Copyright (c) 2013 Jon Schlinkert Released under the MIT license


This file was generated on Wednesday, November 6, 2013.