From cf8ee88abd5f7758debc2c1bed2a25bd99c6b85e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 21 Nov 2010 17:53:32 -0800 Subject: [PATCH] Redirects --- doc-src/Rules | 8 ++++---- doc-src/content/reference.haml | 4 ++++ doc-src/layouts/redirect.haml | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 doc-src/content/reference.haml create mode 100644 doc-src/layouts/redirect.haml diff --git a/doc-src/Rules b/doc-src/Rules index d9f5e5eb17..1fe7d663bc 100644 --- a/doc-src/Rules +++ b/doc-src/Rules @@ -18,7 +18,7 @@ end compile '/' do filter :haml, :ugly => true - layout 'main' + layout item[:redirect] ? "redirect" : (item[:layout] ? item[:layout] : "main") end compile '/search-data/' do @@ -28,7 +28,7 @@ end compile '/examples/*/' do filter :haml, :ugly => true filter :highlight - layout 'example' + layout item[:redirect] ? "redirect" : (item[:layout] ? item[:layout] : "example") end sass_options = Compass.sass_engine_options @@ -44,7 +44,7 @@ end compile '/reference/*/' do filter :haml, :ugly => true filter :highlight - layout item[:layout] || 'main' + layout item[:redirect] ? "redirect" : (item[:layout] ? item[:layout] : "main") end compile '*' do @@ -53,7 +53,7 @@ compile '*' do elsif item[:extension] == "haml" filter :haml, :ugly => true end - layout item[:layout] || 'main' + layout item[:redirect] ? "redirect" : (item[:layout] ? item[:layout] : "main") end route '/search-data/' do diff --git a/doc-src/content/reference.haml b/doc-src/content/reference.haml new file mode 100644 index 0000000000..594a4334ae --- /dev/null +++ b/doc-src/content/reference.haml @@ -0,0 +1,4 @@ +--- +title: Compass Documentation +redirect: /reference/compass/ +--- \ No newline at end of file diff --git a/doc-src/layouts/redirect.haml b/doc-src/layouts/redirect.haml new file mode 100644 index 0000000000..5c7c76ff17 --- /dev/null +++ b/doc-src/layouts/redirect.haml @@ -0,0 +1,5 @@ +!!!5 +- # This template redirects. +%html{:dir => "ltr", :lang => "en"} + %head + %meta{:"http-equiv" => "refresh", :content => "0;#{@item[:redirect]}"}/ \ No newline at end of file