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

49 lines
661 B
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'
2009-11-22 06:11:43 +00:00
end
compile '*/json/' do
filter :erb
end
compile %r{/(technical|personal|)articles/(page/|)} do
filter :erb
layout 'articles'
end
compile %r(/\d{4}/*) do
filter :rdiscount
layout 'article'
layout 'default'
end
compile %r{.*/feed/} do
filter :erb
end
2009-11-09 23:42:38 +00:00
compile '*' do
2009-11-17 02:17:30 +00:00
filter :rdiscount
2009-11-09 23:42:38 +00:00
layout 'default'
end
route '*/json/' do
path = Pathname(item.identifier)
(path.dirname + 'articles.json').to_s
end
route %r{.*/feed/} do
path = Pathname(item.identifier)
path.cleanpath.to_s + '.xml'
end
2009-11-09 23:42:38 +00:00
route '*' do
item.identifier + 'index.html'
end
layout '*', :erb