Created
February 1, 2011 01:48
-
-
Save swanson/805258 to your computer and use it in GitHub Desktop.
Deploying Sintra+Jekyll to Heroku using Rack
This file contains hidden or 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
| pygments: true | |
| source: ./_posts | |
| destination: ./blog |
This file contains hidden or 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 'myapp' | |
| #Rack will serve URLs starting with blog from /blog | |
| use Rack::Static, :urls => ["/blog"] | |
| #Anything else falls through to Sinatra app | |
| run MyApp |
This file contains hidden or 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
| --LOCAL-- | |
| #Renders static pages in /_posts and throws them in /blog | |
| $ jekyll | |
| $ rackup config.ru -p 4567 | |
| --PROD-- | |
| #Need a git hook to run jekyll and git add/commit /blog before push... | |
| $ git push heroku master |
This file contains hidden or 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 'sinatra/base' | |
| require 'erb' | |
| class MyApp < Sinatra::Base | |
| set :static, true | |
| set :public, 'public' | |
| get '/' do | |
| erb :index | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment