1.0.0 • Published 12 years ago
wintersmith-makerelative v1.0.0
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-pluginand add wintersmith-makerelative to your config.json
{
"plugins": [
"wintersmith-makerelative"
]
}Running tests
npm install
npm test1.0.0
12 years ago