2.0.2 • Published 10 years ago

metalsmith-jade v2.0.2

Weekly downloads
32
License
MIT
Repository
github
Last release
10 years ago

Metalsmith Jade version License

Metalsmith plugin to convert jade files.

Build Status Downloads Code Climate Coverage Status Dependencies

Install

npm install --save metalsmith-jade

API

Pass options to the jade plugin and pass it to Metalsmith with the use method:

var Metalsmith = require('metalsmith')
var jade = require('metalsmith-jade')

var metalsmith = new Metalsmith(__dirname)
  .use(jade({
    pretty: false,
    locals: {
      postName: 'good post name'
    },
    filters: {
      foo: function (block) {
        return block.replace('foo', 'bar')
      }
    }
  }))

CLI

You can also use the plugin with the Metalsmith CLI by adding a key to your metalsmith.json file:

{
  "plugins": {
    "metalsmith-jade": {
      "pretty": false
    }
  }
}

All options are passed directly to jade. If options has a locals key, that will be passed along to jade.

Options:

any of the options parameters for jade with the additional plugin specific properties below:

NameTypeDetailsDefault
useMetadataBooleanExpose Metalsmith's global metadata to the Jade template.false
localsObjectPass additional locals to the template{}
filtersObjectregister functions to be used as template filters{}
Example

Support

Donations are welcome to help support the continuous development of this project.

Gratipay PayPal Flattr Bitcoin

License

MIT © Max Bareiss, Ahmad Nassri

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.4

10 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago