Created
April 13, 2010 08:23
-
-
Save baldowl/364420 to your computer and use it in GitHub Desktop.
Heroku-Jekyll-Sinatra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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