Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit c034d8e

Browse files
Chloe JacksonChloe Jackson
Chloe Jackson
authored and
Chloe Jackson
committed
Redirects
1 parent f2106f1 commit c034d8e

File tree

5 files changed

+67
-7
lines changed

5 files changed

+67
-7
lines changed

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ gem "middleman-livereload"
55
gem "redcarpet", "~>2.2.2"
66

77
gem 'middleman-syntax'
8+
9+
gem 'sinatra'

Gemfile.lock

+7
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ GEM
7070
rack (1.5.2)
7171
rack-livereload (0.3.15)
7272
rack
73+
rack-protection (1.5.2)
74+
rack
7375
rack-test (0.6.2)
7476
rack (>= 1.0)
7577
rb-fsevent (0.9.3)
@@ -81,6 +83,10 @@ GEM
8183
rouge (0.3.10)
8284
thor
8385
sass (3.2.10)
86+
sinatra (1.4.4)
87+
rack (~> 1.4)
88+
rack-protection (~> 1.4)
89+
tilt (~> 1.3, >= 1.3.4)
8490
sprockets (2.10.0)
8591
hike (~> 1.2)
8692
multi_json (~> 1.0)
@@ -105,3 +111,4 @@ DEPENDENCIES
105111
middleman-livereload
106112
middleman-syntax
107113
redcarpet (~> 2.2.2)
114+
sinatra

buildrun.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
bundle exec middleman build
4+
bundle exec middleman server

config.rb

+54
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
# end
4848
# end
4949

50+
5051
require 'navigation'
5152
require 'quicklinks'
5253

@@ -125,3 +126,56 @@ def sub_pages(dir)
125126
end
126127

127128
end
129+
130+
#Redirects
131+
require "sinatra"
132+
133+
class BOSHRedir < Sinatra::Base
134+
get "/" do
135+
redirect to('http://docs.cloudfoundry.org/bosh')
136+
end
137+
end
138+
139+
map "/docs/running/bosh/index.html" do
140+
run BOSHRedir
141+
end
142+
143+
class ServicesRedir < Sinatra::Base
144+
get "/" do
145+
redirect to('http://docs.cloudfoundry.org/services/')
146+
end
147+
end
148+
149+
map "/docs/running/architecture/services" do
150+
run ServicesRedir
151+
end
152+
153+
class UsingServicesRedir < Sinatra::Base
154+
get "/" do
155+
redirect to('http://docs.cloudfoundry.org/devguide/services/')
156+
end
157+
end
158+
159+
map "/docs/using/services" do
160+
run UsingServicesRedir
161+
end
162+
163+
class ServicesAPIRedir < Sinatra::Base
164+
get "/" do
165+
redirect to('http://docs.cloudfoundry.org/services/api.html')
166+
end
167+
end
168+
169+
map "/docs/running/architecture/services/api.html" do
170+
run ServicesAPIRedir
171+
end
172+
173+
class DeployingCFRedir < Sinatra::Base
174+
get "/*" do
175+
redirect to('http://docs.cloudfoundry.org/deploying/')
176+
end
177+
end
178+
179+
map "/docs/running/deploying-cf/" do
180+
run DeployingCFRedir
181+
end

source/docs/running/bosh/index.html.md

-7
This file was deleted.

0 commit comments

Comments
 (0)