I\'m wondering if there is a command line utility for taking a GitHub flavored Markdown file and rendering it to HTML.
I\'m using a GitHub wiki to create website con
Maybe this might help:
gem install github-markdown
No documentation exists, but I got it from the gollum documentation. Looking at rubydoc.info, it looks like you can use:
require 'github/markdown'
puts GitHub::Markdown.render_gfm('your markdown string')
in your Ruby code. You can wrap that easily in a script to turn it into a command line utility:
#!/usr/bin/env ruby
# render.rb
require 'github/markdown'
puts GitHub::Markdown.render_gfm File.read(ARGV[0])
Execute it with ./render.rb path/to/my/markdown/file.md. Note that this is not safe for use in production without sanitization.