# mdex

> Export markdown to static github styled docs

Latest version **0.1.6** (published 2018-02-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install mdex
pnpm add mdex
yarn add mdex
bun add mdex
```

Provides the command `mdex`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2018-02-27 |
| First published | 2015-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | loksland |
| Maintainers | loksland |

## Links

- npm: https://www.npmjs.com/package/mdex
- Repository: https://github.com/loksland/mdex
- Issues: https://github.com/loksland/mdex/issues
- npm.io page: https://npm.io/package/mdex

## Dependencies (4)

- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.8
- [html-extractor](https://npm.io/package/html-extractor.md) ^0.2.2
- [github-markdown-render](https://npm.io/package/github-markdown-render.md) ^2.1.0

## Recent versions

- 0.1.6 (latest) — 2018-02-27
- 0.1.5 — 2016-04-26
- 0.1.4 — 2015-09-09
- 0.1.3 — 2015-09-07
- 0.1.2 — 2015-09-07
- 0.1.1 — 2015-09-03
- 0.1.0 — 2015-09-03

## README

mdex
====

Markdown in, github styled static docs out

Command line
------------

Install globally for command line use:
```bash
$ npm install mdex -g
```

```bash
$ mdex src/mydoc.md output/mydoc.html
```

A static github styled HTML doc will be generated

Run locally
-----------

Install module locally
```bash
$ npm install mdex --save
```

```js
var mdex = require('mdex.js');

mdex.generate('./tests/cheatsheet.md', './tests/output/cheatsheet.html', function(err, outputFile){

	if (err){
		throw err;
	}
	
	console.log('Successfully wrote to ' + outputFile);

});

```

Templating
----------

You can specify a custom template to generate command by adding an arg:


```bash
$ mdex src/mydoc.md templates/custom.html output/mydoc.html
```

```js
var mdex = require('mdex');

mdex.generate('./tests/cheatsheet.md', './tests/templates/narrow.html', './tests/output/cheatsheet.html', function(err, outputFile){

	if (err){
		throw err;
	}
	
	console.log('Successfully wrote to ' + outputFile);

});

```

Templates replace the following placeholder tags:
- `{{title}}`  
Autogenerated title will be inserted here. Place inside title tags.
- `{{style}}`  
An area in the head tag where the github style block will be added. Don't place inside style tags.
- `{{body}}`  
The body text placeholder

Note
----

*At the moment only HTML output is supported.*

### Release History ###

- v0.1.1 - Initial working version
- v0.1.2 - Command line pathing fix
- v0.1.3 - Added template config option   
- v0.1.4 - Documentation fix
- v0.1.5 - Dependencies update
- v0.1.6 - Fixed broken dependencies

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