This package has been deprecated

Author message:

Archived

mdex

0.1.6 • Public • Published

mdex

Markdown in, github styled static docs out

Command line

Install globally for command line use:

$ npm install mdex -g
$ mdex src/mydoc.md output/mydoc.html

A static github styled HTML doc will be generated

Run locally

Install module locally

$ npm install mdex --save
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:

$ mdex src/mydoc.md templates/custom.html output/mydoc.html
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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i mdex

Weekly Downloads

5

Version

0.1.6

License

MIT

Unpacked Size

7.52 kB

Total Files

6

Last publish

Collaborators

  • loksland