Skip to content

Instantly share code, notes, and snippets.

@jordelver
Created January 21, 2014 09:21
Show Gist options
  • Save jordelver/8536912 to your computer and use it in GitHub Desktop.
Save jordelver/8536912 to your computer and use it in GitHub Desktop.
Middleman config
require 'rack'
require 'rack/contrib/try_static'
use Rack::Deflater
use Rack::TryStatic,
root: 'build',
urls: %w[/],
try: ['.html', 'index.html', '/index.html']
run lambda{ |env|
four_oh_four_page = File.expand_path("../build/404/index.html", __FILE__)
[ 404, { 'Content-Type' => 'text/html'}, [ File.read(four_oh_four_page) ]]
}
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'https://rubygems.org'
ruby "2.1.0"
gem "middleman", "~> 3.1.0"
gem "middleman-blog"
gem "middleman-livereload"
gem "middleman-syntax"
gem "redcarpet"
gem "middleman-favicon-maker"
# For running on Heroku
gem "puma"
gem "rack-contrib"
gem "foreman"
gem "newrelic_rpm"
web: bundle exec puma -p $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment