1.0.0 • Published 10 years ago

wintersmith-makerelative v1.0.0

Weekly downloads
4
License
-
Repository
github
Last release
10 years ago

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