{{rel}}
Handlebars helper for generating a relative link from the current page to the specified page.
Installation
Use npm to install the package: npm i handlebars-helper-rel
.
Register the helper
The easiest way to register the helper with Assemble is to add the module to devDependencies
and keywords
in your project's package.json:
Alternatively, to register the helper explicitly in the Gruntfile:
grunt;
Usage
With the helper registered, you may now begin using it in your templates:
Masthead Markdown Readme Blog About
site.root
If a site.root
variable is defined in the context, then you can omit that part from the paths.
For example, let's say you are using a _config.yml
file:
grunt;
And it contains a root
variable:
root: foo/bar
Then you can omit foo/bar
from the paths defined in your templates:
Masthead Markdown Readme Blog About
Author
Jon Schlinkert
License and Copyright
Copyright (c) 2014 Jon Schlinkert, contributors. Licensed under the MIT License