mirror of
https://github.com/danog/sass-site.git
synced 2025-01-22 05:41:42 +01:00
Move the deploy-mode Gemfile/config.ru stuff to the master branch.
This commit is contained in:
parent
df2e4415ff
commit
eec20ea771
36
Gemfile
36
Gemfile
@ -1,22 +1,22 @@
|
||||
source "http://rubygems.org"
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "builder"
|
||||
gem "rake"
|
||||
#gem "kss"
|
||||
|
||||
gem "middleman", "~>3.1.5"
|
||||
gem "middleman-favicon-maker"
|
||||
gem "middleman-livereload"
|
||||
gem "middleman-syntax"
|
||||
#gem "middleman-smusher"
|
||||
gem "redcarpet"
|
||||
gem "susy", "2.0.0.alpha.4"
|
||||
gem "breakpoint"
|
||||
gem "typogruby"
|
||||
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
||||
gem 'rack-rewrite'
|
||||
platforms :mri_18 do
|
||||
gem "ruby18_source_location"
|
||||
group :development do
|
||||
gem "middleman", "~>3.1.5"
|
||||
gem "middleman-favicon-maker"
|
||||
gem "middleman-livereload"
|
||||
gem "middleman-syntax"
|
||||
gem "redcarpet"
|
||||
gem "susy", "2.0.0.alpha.4"
|
||||
gem "breakpoint"
|
||||
gem "typogruby"
|
||||
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
||||
platforms :mri_18 do
|
||||
gem "ruby18_source_location"
|
||||
end
|
||||
end
|
||||
|
||||
group :deploy do
|
||||
gem 'rack-rewrite'
|
||||
end
|
||||
# gem "rack-codehighlighter"
|
||||
# gem "pygments.rb"
|
||||
|
@ -1,5 +1,5 @@
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (3.2.14)
|
||||
i18n (~> 0.6, >= 0.6.4)
|
||||
@ -7,7 +7,6 @@ GEM
|
||||
breakpoint (2.0.7)
|
||||
compass (>= 0.12.1)
|
||||
sass (>= 3.2.0)
|
||||
builder (3.2.2)
|
||||
chunky_png (1.2.8)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script-source
|
||||
@ -123,7 +122,6 @@ PLATFORMS
|
||||
|
||||
DEPENDENCIES
|
||||
breakpoint
|
||||
builder
|
||||
middleman (~> 3.1.5)
|
||||
middleman-favicon-maker
|
||||
middleman-livereload
|
||||
|
@ -1,4 +1,3 @@
|
||||
require "builder"
|
||||
require 'susy'
|
||||
require 'breakpoint'
|
||||
require 'middleman-syntax'
|
||||
|
32
config.ru
32
config.ru
@ -1,12 +1,26 @@
|
||||
require "rubygems"
|
||||
require "middleman"
|
||||
require "typogruby"
|
||||
require "rack/rewrite"
|
||||
|
||||
use Rack::Rewrite do
|
||||
r301 %r{/docs/yardoc/(.*)}, '/documentation/$1'
|
||||
r301 %r{/tutorial\.html}, '/guide'
|
||||
r301 %r{/download\.html}, '/install'
|
||||
if ENV["HEROKU"].nil? || ENV["HEROKU"] == 'false'
|
||||
require "middleman"
|
||||
run Middleman.server
|
||||
else
|
||||
require "rack/rewrite"
|
||||
|
||||
use Rack::Rewrite do
|
||||
r301 %r{/docs/yardoc/(.*)}, '/documentation/$1'
|
||||
r301 '/tutorial.html', '/guide'
|
||||
r301 '/download.html', '/install'
|
||||
r301 '/documentation', '/documentation/'
|
||||
|
||||
rewrite(%r{^(.*)/([^/.]+)$}, lambda do |match, rack_env|
|
||||
path = "#{File.dirname(__FILE__)}/build#{match[0]}"
|
||||
next "#{match[1]}/#{match[2]}/index.html" if Dir.exists?(path)
|
||||
next match[0] if File.exists?(path)
|
||||
"#{match[0]}.html"
|
||||
end)
|
||||
end
|
||||
|
||||
use Rack::Static, :urls => [""], :root => 'build', :index => 'index.html'
|
||||
|
||||
run lambda {}
|
||||
end
|
||||
|
||||
run Middleman.server
|
Loading…
x
Reference in New Issue
Block a user