Skip to content

Instantly share code, notes, and snippets.

@jbhannah
Last active May 10, 2017 06:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jbhannah/4551206 to your computer and use it in GitHub Desktop.
Save jbhannah/4551206 to your computer and use it in GitHub Desktop.
Jekyll on Heroku without Rack::Jekyll or custom buildpacks
require 'rack/contrib/try_static'
require 'rack/contrib/not_found'
use Rack::TryStatic,
:root => "_site",
:urls => %w[/],
:try => ['index.html', '/index.html']
run Rack::NotFound.new('_site/404.html')
web: bundle exec puma -p $PORT config.ru
namespace :assets do
desc 'Precompile assets'
task :precompile do
sh "bundle exec jekyll build"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment