Skip to content

Commit

Permalink
Redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseppstein committed Nov 22, 2010
1 parent 404c404 commit cf8ee88
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc-src/Rules
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions doc-src/content/reference.haml
@@ -0,0 +1,4 @@
---
title: Compass Documentation
redirect: /reference/compass/
---
5 changes: 5 additions & 0 deletions 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]}"}/

0 comments on commit cf8ee88

Please sign in to comment.