github-markdown-preview
Convert markdown to html with inlined styles using github-markdown-css
Last updated 4 years ago by timhudson .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install github-markdown-preview 
SYNC missed versions from official npm registry.

github-markdown-preview

Convert markdown to html with inlined styles using generate-github-markdown-css

Programmatic usage

var fs = require('fs')
var convert = require('github-markdown-preview')

var md = fs.readFileSync('path/to/your.markdown')

convert(md, function(err, html) {
  console.log(html)
})

CLI

$ npm install --global github-markdown-preview
$ github-markdown-preview --help
Usage: github-markdown-preview <markdown-file> [options]

outputs html of markdown with github styles to stdout

Options:

  -h, --help     output usage information
  -s, --server   watch file and server changes. This overrides -w and -o.
  -w, --watch    watch markdown file and convert on changes
  -p, --port     optional TCP port to start the server at, defaults to 9999
  -o, --output   optional file path for output. stdout is used by default.
                 required when using --watch.

Live-reload

Watches markdown file and automatically updates preview in browser

$ github-markdown-preview ./README.md -s
Preview now being served at http://localhost:9999

License

MIT

Current Tags

  • 1.3.0                                ...           latest (4 years ago)

7 Versions

  • 1.3.0                                ...           4 years ago
  • 1.2.4                                ...           4 years ago
  • 1.2.3                                ...           4 years ago
  • 1.2.2                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 6
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |