wintersmith-makerelative
v1.0.0
Published
Ensures you no longer have to deal with baseUrl in wintersmith.
Downloads
4
Readme
wintersmith-makerelative
Wintersmith makeRelative() helper
Ensures you no longer have to deal with baseUrl in wintersmith.
Intended use is from something like a jade template:
link(rel='stylesheet', href=makeRelative(page.url, '/syntax.css'))
That way the template can be used deep in hierarchies and will render the following for /foo/bar/baz/
:
<link rel="stylesheet" href="../../../syntax.css">
Installing
Install globally or locally using npm
npm install [-g] wintersmith-plugin
and add wintersmith-makerelative
to your config.json
{
"plugins": [
"wintersmith-makerelative"
]
}
Running tests
npm install
npm test