From 63e56eb2c8c0a34fac4e31a86bfb08722460ca0f Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sat, 12 Oct 2013 17:14:31 -0400 Subject: [PATCH] Redirect from popular old sass-lang.com URLs. --- Gemfile | 1 + Gemfile.lock | 2 ++ config.rb | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/Gemfile b/Gemfile index a9a1468..fdbe280 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,7 @@ 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" end diff --git a/Gemfile.lock b/Gemfile.lock index d8347b4..08e3fc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,6 +81,7 @@ GEM rack (1.5.2) rack-livereload (0.3.15) rack + rack-rewrite (1.4.01) rack-test (0.6.2) rack (>= 1.0) rake (10.1.0) @@ -127,6 +128,7 @@ DEPENDENCIES middleman-favicon-maker middleman-livereload middleman-syntax + rack-rewrite rake redcarpet ruby18_source_location diff --git a/config.rb b/config.rb index a2c860a..8481a57 100644 --- a/config.rb +++ b/config.rb @@ -2,6 +2,8 @@ require "builder" require 'susy' require 'breakpoint' require 'middleman-syntax' +require 'rack/rewrite' + # TODO: Make this work # require "kss" # require 'typogruby' @@ -62,6 +64,11 @@ end page "/documentation/*", :directory_index => false +use Rack::Rewrite do + r301 %r{/docs/yardoc/(.*)}, '/documentation/$1' + r301 %r{/tutorial\.html}, '/guide' + r301 %r{/download\.html}, '/install' +end configure :build do