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