Last active
May 10, 2017 06:50
-
-
Save jbhannah/4551206 to your computer and use it in GitHub Desktop.
Jekyll on Heroku without Rack::Jekyll or custom buildpacks
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 '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') |
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
web: bundle exec puma -p $PORT config.ru |
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
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