# simple-md2html

> Simple Markdown to HTML converter

Latest version **1.1.0** (published 2017-05-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-md2html
pnpm add simple-md2html
yarn add simple-md2html
bun add simple-md2html
```

Provides the command `md2html`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-05-09 |
| First published | 2017-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+6 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Eneko Olivares Gorriti |
| Maintainers | enolgor |
| Keywords | markdown, html, pygments, convert, marked, md, pygmentize, markup, compile |

## Links

- npm: https://www.npmjs.com/package/simple-md2html
- Repository: https://github.com/enolgor/simple-md2html
- Homepage: https://github.com/enolgor/simple-md2html#readme
- Issues: https://github.com/enolgor/simple-md2html/issues
- npm.io page: https://npm.io/package/simple-md2html

## Dependencies (7)

- [tmp](https://npm.io/package/tmp.md) 0.0.31
- [marked](https://npm.io/package/marked.md) ^0.3.6
- [request](https://npm.io/package/request.md) ^2.81.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [fs-jetpack](https://npm.io/package/fs-jetpack.md) ^0.13.3
- [run-waterfall](https://npm.io/package/run-waterfall.md) ^1.1.3
- [pygmentize-bundled](https://npm.io/package/pygmentize-bundled.md) ^2.3.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-05-09
- 1.0.0 — 2017-05-08

## README

[![NPM](https://nodei.co/npm/simple-md2html.png)](https://nodei.co/npm/simple-md2html/)

# Simple Markdown to HTML converter. No BS.

**Very simple** markdown to HTML converter. You can convert it to PDF with any decent browser afterwards.

It uses [marked](https://github.com/chjj/marked) + [pygmentize](https://github.com/rvagg/node-pygmentize-bundled) to convert it to html, default options.

## What does this library do then?

It **embeds all images and style** (precompiled from pygmentize) so you have **one html file self-contained.**

## Why do you use pygmentize? 

Because any other sucks, even if you have install python for it. Believe me.

## Requirements

Install python 2.X or 3.X to use [pygmentize](https://github.com/rvagg/node-pygmentize-bundled).

## Example Usage

### NodeJS module

```javascript
const md2html = require('simple-md2html');
md2html(filepath, style, (err, html) => {
  // err will be null if everything is ok
  // html contains the converted markdown document
});
```

### CLI

Install globally with `npm install -g simple-md2html` to use the CLI.

`md2html <filepath> [-s <style>]` will create in the current working directory
a html file with the same name of the specified markdown document.

## Precompiled Styles

[Pygmentize](https://github.com/rvagg/node-pygmentize-bundled) uses [pygments](http://pygments.org/download/)(v2.0) python package to give color to your code. This module
has precompiled versions of the styles that come included by default:

```
'default',
'emacs',
'friendly',
'colorful',
'autumn',
'murphy',
'manni',
'monokai',
'perldoc',
'pastie',
'borland',
'trac',
'native',
'fruity',
'bw',
'vim',
'vs',
'tango',
'rrt',
'xcode',
'igor',
'paraiso-light',
'paraiso-dark'
```

---
_Source: https://npm.io/package/simple-md2html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
