Skip to content

Instantly share code, notes, and snippets.

@deplorableword
Created January 16, 2011 15:14
Show Gist options
  • Select an option

  • Save deplorableword/781871 to your computer and use it in GitHub Desktop.

Select an option

Save deplorableword/781871 to your computer and use it in GitHub Desktop.
How to run a Jeykll site on Heroku with Sinatra
require 'devart'
run Sinatra::Application
require 'rubygems'
require 'sinatra'
set :public, Proc.new { File.join(root, "_site") }
# Added headers for Varnish
before do
response.headers['Cache-Control'] = 'public, max-age=36000'
end
get '/*' do
File.read("_site/#{params[:title]}/index.html")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment