Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arve0/metalsmith-pandoc
metalsmith pandoc plugin
https://github.com/arve0/metalsmith-pandoc
Last synced: 8 days ago
JSON representation
metalsmith pandoc plugin
- Host: GitHub
- URL: https://github.com/arve0/metalsmith-pandoc
- Owner: arve0
- License: mit
- Created: 2014-12-07T00:43:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T19:12:34.000Z (about 1 year ago)
- Last Synced: 2024-09-23T12:38:33.546Z (about 2 months ago)
- Language: JavaScript
- Size: 179 KB
- Stars: 9
- Watchers: 5
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/metalsmith-pandoc.svg)](https://badge.fury.io/js/metalsmith-pandoc) [![Build Status](https://travis-ci.org/arve0/metalsmith-pandoc.svg?branch=master)](https://travis-ci.org/arve0/metalsmith-pandoc)
# metalsmith-pandoc
Wrap around [pdc](https://github.com/pvorb/node-pdc), which lets you transform files with pandoc. For example from markdown to Word (docx). Pandoc needs to be [system installed](http://pandoc.org/installing.html).## Install
```sh
npm install metalsmith-pandoc
```## Usage
```js
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](https://github.com/pvorb/node-pdc#api) and [pandoc](http://johnmacfarlane.net/pandoc/README.html) for more detailed description of options.## Release
```sh
npm version major|minor|patch
npm publish
```## Credit
Stole code from [metalsmith-markdown](https://github.com/segmentio/metalsmith-markdown).