mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 12:52:47 +00:00
33 lines
474 B
Ruby
33 lines
474 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
compile '/' do
|
|
layout 'home'
|
|
end
|
|
|
|
compile '/articles/', :rep => :json do
|
|
filter :erb
|
|
end
|
|
compile '/articles/' do
|
|
layout 'articles'
|
|
end
|
|
compile '/*/articles/' do
|
|
layout 'articles'
|
|
end
|
|
|
|
compile '*' do
|
|
filter :rdiscount
|
|
layout 'default'
|
|
end
|
|
|
|
route '/articles/', :rep => :json do
|
|
item.identifier + 'index.json'
|
|
end
|
|
route '/articles/' do
|
|
item.identifier + 'index.html'
|
|
end
|
|
|
|
route '*' do
|
|
item.identifier + 'index.html'
|
|
end
|
|
|
|
layout '*', :erb
|