{{isActive}}
Generate relative links from the "current page" to other dest pages.
Installation
Use npm to install the package: npm i handlebars-helper-isActive
.
Register the helper
In your project's Gruntfile, to register the helper add handlebars-helper-isActive
to the helpers
property in the Assemble task or target options:
grunt;
Alternatively, you can avoid defining the helper in the Assemble task options by adding module to both the devDependencies
and keywords
in your project's package.json.
Usage
With the helper registered, you may now begin using it in your templates.
Examples also shows the {{autolink}} helper.
In a "page"
{{#each pages}} {{data.title}}{{/each}}
In a "layout"
{{#each pages}} {{../title}}{{/each}}
Renders to:
FooBarBaz
Author
Jon Schlinkert
License and Copyright
Licensed under the MIT License Copyright (c) Jon Schlinkert, contributors.