Tweet

Docs /  configuration

options.helpers

options.helpers

Helpers manipulate the output of variables

For the most part helper expressions follow this pattern: {{ helper_name variable_name }}.

For example:

<title > {{ uppercase  title  }} </title > 

Renders to:

<title>PAGE TITLE</title>

Register custom helpers

Custom helpers may be loaded with the current engine via options: { helpers: []} in the assemble task or target. But any helpers registered at the target level will override task-level helpers.

Globbing patterns may be used to specify paths to the helpers to be loaded:

assemble: {
  options: {
    helpers: ['./lib/helpers/**/*.js' ]
  }
}

For more info see Custom Helpers. Or download grunt-init-helper to generate helpers →


See the template for this page →

Find an error? Let us know →