1
0
Fork 0
forked from wezm/wezm.net
wezm.net/Rules

69 lines
1 KiB
Text
Raw Normal View History

2009-11-09 23:42:38 +00:00
#!/usr/bin/env ruby
require 'pathname'
2009-11-22 06:11:43 +00:00
compile '/' do
layout 'home'
filter :rubypants
2009-11-22 06:11:43 +00:00
end
2010-03-10 21:04:32 +00:00
compile %r{/(?:technical|personal|)articles/(page/|)} do
filter :erb
layout 'articles'
filter :rubypants
end
compile %r(/\d{4}/.*) do
filter :rdiscount
layout 'article'
layout 'default'
filter :rubypants
end
compile %r{.*/feed/} do
filter :erb
end
2010-06-15 21:52:54 +00:00
compile %r{^/(?:robots|sitemap)/$} do
2010-03-10 21:04:32 +00:00
filter :erb
end
2010-06-15 21:52:54 +00:00
compile %r{^/(?:screen|mobile)/$} do
filter :sass
end
2009-11-09 23:42:38 +00:00
compile '*' do
filter :rdiscount
2009-11-09 23:42:38 +00:00
layout 'default'
filter :rubypants
2009-11-09 23:42:38 +00:00
end
2010-06-15 21:52:54 +00:00
route %r{.*/feed/$} do
2010-04-01 07:24:05 +00:00
item.identifier + 'index.xml'
end
2010-03-10 21:04:32 +00:00
route '/robots/' do
'/robots.txt'
end
route '/sitemap/' do
'/sitemap.xml'
end
2010-06-15 21:52:54 +00:00
# route '*/json/' do
# path = Pathname(item.identifier)
# (path.dirname + 'articles.json').to_s
# end
route %r{^/(?:screen|mobile)/$} do
path = Pathname(item.identifier)
'/' + path.basename.to_s + '.css'
# (path.dirname + 'articles.json').to_s
end
2009-11-09 23:42:38 +00:00
route '*' do
item.identifier + 'index.html'
end
layout '*', :erb