mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-10 01:42:32 +00:00
762b56e401
Doing the archives this way removes the problem of loading page 1 then replacing it with page 2
61 lines
992 B
Ruby
61 lines
992 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 '/articles/page/' do
|
|
filter :erb
|
|
layout 'articles'
|
|
end
|
|
compile '/technical/articles/' do
|
|
filter :erb
|
|
layout 'articles'
|
|
end
|
|
compile '/technical/articles/page/' do
|
|
filter :erb
|
|
layout 'articles'
|
|
end
|
|
compile '/personal/articles/' do
|
|
filter :erb
|
|
layout 'articles'
|
|
end
|
|
compile '/personal/articles/page/' 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
|