2009-11-09 23:42:38 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
2009-11-22 06:11:43 +00:00
|
|
|
compile '/' do
|
2010-01-30 04:33:54 +00:00
|
|
|
layout 'home'
|
2010-03-31 20:57:37 +00:00
|
|
|
filter :rubypants
|
2009-11-22 06:11:43 +00:00
|
|
|
end
|
|
|
|
|
2010-09-20 22:03:10 +00:00
|
|
|
compile '/weather/' do
|
|
|
|
layout 'weather'
|
|
|
|
filter :erb
|
|
|
|
end
|
|
|
|
|
2010-03-10 21:04:32 +00:00
|
|
|
compile %r{/(?:technical|personal|)articles/(page/|)} do
|
2010-02-03 02:34:04 +00:00
|
|
|
filter :erb
|
|
|
|
layout 'articles'
|
2010-03-31 20:57:37 +00:00
|
|
|
filter :rubypants
|
2010-02-03 02:34:04 +00:00
|
|
|
end
|
2010-02-04 02:38:35 +00:00
|
|
|
|
2014-12-18 11:47:09 +00:00
|
|
|
compile %r(/\d{4}/.*) do
|
2010-03-31 20:57:37 +00:00
|
|
|
filter :rdiscount
|
2014-12-18 11:47:09 +00:00
|
|
|
layout 'article'
|
|
|
|
layout 'default'
|
2010-03-31 20:57:37 +00:00
|
|
|
filter :rubypants
|
2010-02-03 02:34:04 +00:00
|
|
|
end
|
2009-11-23 02:34:17 +00:00
|
|
|
|
2014-12-18 11:47:09 +00:00
|
|
|
compile %r(/about/.*) do
|
2014-12-18 11:22:12 +00:00
|
|
|
filter :rdiscount
|
2014-12-18 11:47:09 +00:00
|
|
|
layout 'topphoto'
|
2014-12-18 11:22:12 +00:00
|
|
|
filter :rubypants
|
|
|
|
end
|
|
|
|
|
2010-03-10 08:54:25 +00:00
|
|
|
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
|
2010-03-31 20:57:37 +00:00
|
|
|
filter :rdiscount
|
2009-11-09 23:42:38 +00:00
|
|
|
layout 'default'
|
2010-03-31 20:57:37 +00:00
|
|
|
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'
|
2010-03-10 08:54:25 +00:00
|
|
|
end
|
|
|
|
|
2010-03-10 21:04:32 +00:00
|
|
|
route '/robots/' do
|
|
|
|
'/robots.txt'
|
|
|
|
end
|
|
|
|
|
|
|
|
route '/sitemap/' do
|
|
|
|
'/sitemap.xml'
|
|
|
|
end
|
2010-03-10 08:54:25 +00:00
|
|
|
|
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
|
2010-06-16 10:19:03 +00:00
|
|
|
File.join("", "css", File.basename(item.identifier) + ".css")
|
2010-06-15 21:52:54 +00:00
|
|
|
end
|
|
|
|
|
2009-11-09 23:42:38 +00:00
|
|
|
route '*' do
|
|
|
|
item.identifier + 'index.html'
|
|
|
|
end
|
|
|
|
|
|
|
|
layout '*', :erb
|