Skip to content

Instantly share code, notes, and snippets.

@gerardc
Created March 19, 2013 11:06
Show Gist options
  • Save gerardc/5195283 to your computer and use it in GitHub Desktop.
Save gerardc/5195283 to your computer and use it in GitHub Desktop.
Alternative to `jekyll --server`. Need to run `jekyll --auto` in adjacent terminal for reloading.
require 'bundler/setup'
require 'rack/contrib/try_static'
use Rack::TryStatic, :root => "_site", :urls => %w[/], :try => ['.html', 'index.html', '/index.html']
run Proc.new {|env| [404, {"Content-Type" => "text/plain"}, ["File not found"]]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment