Nebulous Program Mechanic
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

metalsmith-pandoc

1.0.0 • Public • Published

npm version Build Status

metalsmith-pandoc

Wrap around pdc, which lets you transform files with pandoc. For example from markdown to Word (docx). 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', // multimatch
  ext: '.html' // extension for output file
};

To override the defaults, pass an object to the plugin:

.use(pandoc({
  pattern: ['rsts/*.md', 'docs/**/*.md'],
  args: ['--columns=80'],
  from: 'markdown',
  to: 'rst',
  ext: '.rst'
}))

See pdc and pandoc for more detailed description of options.

Release

npm version major|minor|patch
npm publish

Credit

Stole code from metalsmith-markdown.

install

npm i metalsmith-pandoc

Downloadsweekly downloads

5

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability