wintersmith-makerelative

1.0.0 • Public • Published

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

/wintersmith-makerelative/

    Package Sidebar

    Install

    npm i wintersmith-makerelative

    Weekly Downloads

    1

    Version

    1.0.0

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • ericanderson