1.1.5 • Published 9 years ago

mdhtmljson v1.1.5

Weekly downloads
70
License
-
Repository
github
Last release
9 years ago

mdhtmljson is a simple Node module that takes a URL of a Markdown file, converts it to HTML and outputs it into a JSON file.

Installation

npm install mdhtmljson -g

CLI

Usage: mdhtmljson <entry file> [options]

Options:

  -h, --help                  output usage information
  -V, --version               output the version number
  -o, --output <output file>  write output to this file – include path (.json file extension not needed)

Example:

  $ mdhtmljson https://github.com/peduarte/wallop/blob/master/README.md -o ./data/docs.json

Example

mdhtmljson http://urlto.markdown.md -o /path/to/output.json

The command above will output the following in /path/to/: output.json

{
  "html": "<h1>Contents from the markdown</h1><p>...</p>"
}

NodeJS

var mdhtmljson = require('mdhtmljson);

var markdownUrl = 'http://urlto.markdown.md';
var jsonOutput = '/path/to/output.json';

mdhtmljson(markdownUrl, jsonOutput);

#protip If not option is specified, it will output mdhtml.hson in your root directory.

Demo

You can see in action on wallop site to take the Readme file from wallop and use it as documentation on the site too. This way I only have one point of documentation 😁

Licensing

MIT © 2015 Pedro Duarte

1.1.5

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago