Skip to content

Instantly share code, notes, and snippets.

@rob-mcgrail
Created September 3, 2012 03:47
Show Gist options
  • Select an option

  • Save rob-mcgrail/3606611 to your computer and use it in GitHub Desktop.

Select an option

Save rob-mcgrail/3606611 to your computer and use it in GitHub Desktop.
Tiny markdown document server
# $ gem install sinatra bluecloth
require 'rubygems'
require 'bluecloth'
require 'sinatra'
get '/' do
f = File.open(ARGV[0])
BlueCloth.new(f.read).to_html
end
# $ ruby markdown.rb /absolute/file/path.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment