Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1 KB

README.md

File metadata and controls

44 lines (37 loc) · 1 KB

npm version

metalsmith-pandoc

Wrap around pdc. Pandoc needs to be system installed.

Install

npm install metalsmith-pandoc

Usage

pandoc = require('metalsmith-pandoc');

Metalsmith(__dirname)
.use(pandoc())
...

As default, plugin will use these settings:

options = {
  from: 'markdown',
  to:   'html5',
  args: [],
  opts: [],
  pattern: '**/*.md', // minimatch
  ext: '.html' // extension for output file
};

For overriding the defaults, pass an object to plugin:

.use(pandoc({
  pattern: 'html/**/*.rst',
  from: 'rst',
  to: 'markdown',
  ext: '.md'
}))

See pdc and pandoc for more detailed description of options.

Credit

Stole code from metalsmith-markdown.