markx
markx converts markdown with code snippets into html. It also has options to pass in a template file and data. It is great for building github pages and creating blog posts from markdown files.
Installation
Inside a project:
npm install markx --save
Globally:
npm install markx -g
CLI Usage
markx input.md [opts]
Options:
Options:
-t, --template HTML template file
-l, --highlight Enable or disable syntax highlighting
-d, --data JSON|YAML data file that gets passed to input and template
-h, --help Show help info
API Usage
var markx = ; ;
Example
Command
markx.js readme-example.md --template readme-example-template.html --data readme-example.json
Markdown
#This is a heading This is a paragraph ```javascript var a = '123'; var f = function() { return 4; } ```
Template
<%= pageTitle %> Logo <%- body %> Footer
Data
"pageTitle": "This is the page title"
Output
This is the page title Logo This is a headingThis is a paragraph var a = '123';var f = function() { return 4;} Footer
History
Development and Tests
npm install
./node_modules/.bin/grunt