Wrap around pdc. Pandoc needs to be system installed.
npm install metalsmith-pandoc
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.
Stole code from metalsmith-markdown.