1
0
Fork 0
forked from wezm/wezm.net
wezm.net/Rules
Wesley Moore b44a648002 Get feeds partially working
Need to install the builder gem
2010-03-10 19:54:25 +11:00

48 lines
661 B
Ruby

#!/usr/bin/env ruby
require 'pathname'
compile '/' do
layout 'home'
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
compile '*' do
filter :rdiscount
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
route '*' do
item.identifier + 'index.html'
end
layout '*', :erb