mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-10 01:42:32 +00:00
30 lines
427 B
Ruby
30 lines
427 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
compile '/' do
|
|
layout 'listing'
|
|
end
|
|
|
|
compile '/articles/', :rep => :json do
|
|
filter :erb
|
|
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
|