Socket
Socket
Sign inDemoInstall

mdhtmljson

Package Overview
Dependencies
49
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mdhtmljson

Convert Markdown to HTML into a JSON file


Version published
Weekly downloads
18
increased by200%
Maintainers
1
Install size
3.82 MB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 26 Aug 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc