Skip to content

Instantly share code, notes, and snippets.

@mulder
Created November 27, 2009 15:39
Show Gist options
  • Save mulder/244072 to your computer and use it in GitHub Desktop.
Save mulder/244072 to your computer and use it in GitHub Desktop.
Host Jekyll site on Heroku!
# Rackup file to host Jekyll site on Heroku!
# Remember to push your _site directory.....
require 'jekyll'
config = {'default' => 'index.html'}.merge(Jekyll.configuration({}))
file_server = Rack::File.new('_site')
run lambda { |ENV|
ENV['PATH_INFO'] = config['default'] if ENV['PATH_INFO'] == '/'
file_server.call(ENV)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment