Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A simple sinatra app that you can use with LiveReload to create a markdown previewer app. For example, to be used side by side with a vim window
require 'sinatra'
require 'github/markdown'
get '/' do
@markdown_file = ENV['file']
@markup = GitHub::Markdown.render_gfm(
erb :index
@@ layout
<title><%= @markdown_file %></title>
body {background: black; color: white; }
<%= yield %>
@@ index
<%= @markup %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.