Skip to content

Instantly share code, notes, and snippets.

@baldowl
Created April 13, 2010 08:23
Show Gist options
  • Save baldowl/364420 to your computer and use it in GitHub Desktop.
Save baldowl/364420 to your computer and use it in GitHub Desktop.
Heroku-Jekyll-Sinatra
before do
cache_control :public, :max_age => 31557600
end
get '/' do
send_file(File.join(settings.public, 'index.html'), :disposition => nil)
end
get '/*' do
send_file(File.join(settings.public, params[:splat]), :disposition => nil)
end
require 'rubygems'
gem 'sinatra', '= 1.0'
require 'sinatra'
require 'app'
set :public, Proc.new {File.join(root, '_site')}
disable :static
run Sinatra::Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment