From 63e56eb2c8c0a34fac4e31a86bfb08722460ca0f Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sat, 12 Oct 2013 17:14:31 -0400 Subject: [PATCH 1/4] 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 From d307d7f2be1912187a51be3a156423642322900c Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sat, 12 Oct 2013 17:32:09 -0400 Subject: [PATCH 2/4] Point the Release Notes link to the bundled changelog. --- source/layouts/layout.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index 27741f1..8baab03 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -29,7 +29,7 @@ %li Current Release: #{data.version.name} (#{data.version.number}) - else %li Current Release: ??? - %li=link_to "Release Notes", "http://sass-lang.com/docs/yardoc/file.SASS_CHANGELOG.html" + %li=link_to "Release Notes", "/documentation/file.SASS_CHANGELOG.html" %li=link_to "Fork on Github", "https://github.com/nex3/sass" = partial "layouts/regions/contentinfo" From 739343c2e60808a588005b9260e8025999bb99c0 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sat, 12 Oct 2013 17:40:16 -0400 Subject: [PATCH 3/4] Add the sass-lang.com analytics id. --- source/layouts/foot/_javascripts.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/layouts/foot/_javascripts.haml b/source/layouts/foot/_javascripts.haml index c69591a..94e9304 100644 --- a/source/layouts/foot/_javascripts.haml +++ b/source/layouts/foot/_javascripts.haml @@ -12,4 +12,4 @@ e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); - ga('create','UA-XXXXX-X');ga('send','pageview'); + ga('create','UA-535380-8');ga('send','pageview'); From de1521b86ba05f9a496e6e9ae52f3d94cbacb7c3 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sat, 12 Oct 2013 17:46:21 -0400 Subject: [PATCH 4/4] Make /install fail gracefully if the version number doesn't exist. --- source/install.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/install.haml b/source/install.haml index 2e716da..88761c5 100644 --- a/source/install.haml +++ b/source/install.haml @@ -72,7 +72,10 @@ layout: layout_1_column %pre :preserve sass -v - %p It should return Sass #{data.version.number} (#{data.version.name}). Congratulations! You've successfully installed Sass. + - if data.respond_to?(:version) + %p It should return Sass #{data.version.number} (#{data.version.name}). Congratulations! You've successfully installed Sass. + - else + %p It should return Sass ???. Congratulations! You've successfully installed Sass. %li %p 5. Go and play. If you're brand new to Sass we've set up some resources to help you learn pretty darn quick.