Skip to content
Browse files

changed default server from jekyll-webrick to thin

  • Loading branch information...
1 parent 4b473f5 commit 70e0677399366a32cebfa0845df5c274aebea4a6 @jfromaniello committed Nov 24, 2011
Showing with 29 additions and 2 deletions.
  1. +4 −1 Gemfile
  2. +12 −0 Gemfile.lock
  3. +1 −1 Procfile
  4. +12 −0 config.ru
View
5 Gemfile
@@ -4,4 +4,7 @@ gem 'liquid', '<=2.2.2'
gem 'RedCloth'
gem 'jekyll'
gem 'jekyll_ext'
-gem 'rdiscount'
+gem 'rdiscount'
+gem 'rack'
+gem 'rack-try_static'
+gem 'thin'
View
12 Gemfile.lock
@@ -6,7 +6,9 @@ GEM
posix-spawn (>= 0.3.6)
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
+ daemons (1.1.4)
directory_watcher (1.4.1)
+ eventmachine (0.12.10)
fast-stemmer (1.0.0)
jekyll (0.11.0)
albino (>= 1.3.2)
@@ -21,8 +23,15 @@ GEM
maruku (0.6.0)
syntax (>= 1.0.0)
posix-spawn (0.3.6)
+ rack (1.1.0)
+ rack-try_static (0.1.1)
+ rack (= 1.1.0)
rdiscount (1.6.8)
syntax (1.0.0)
+ thin (1.3.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
PLATFORMS
ruby
@@ -32,4 +41,7 @@ DEPENDENCIES
jekyll
jekyll_ext
liquid (<= 2.2.2)
+ rack
+ rack-try_static
rdiscount
+ thin
View
2 Procfile
@@ -1 +1 @@
-web: ejekyll --server $PORT
+web: bundle exec thin start -p $PORT
View
12 config.ru
@@ -0,0 +1,12 @@
+require 'rack'
+require 'rack/contrib/try_static'
+
+system("jekyll")
+
+use Rack::TryStatic,
+ :root => "_site", # static files root dir
+ :urls => %w[/], # match all requests
+ :try => ['.html', 'index.html', '/index.html'] # try these postfixes sequentially
+
+# otherwise 404 NotFound
+run lambda { [404, {'Content-Type' => 'text/html'}, ['whoops! Not Found']]}

0 comments on commit 70e0677

Please sign in to comment.
Something went wrong with that request. Please try again.