diff --git a/Rules b/Rules index 06dc076..c5581bd 100644 --- a/Rules +++ b/Rules @@ -4,39 +4,19 @@ 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 +compile '*/json/' do filter :erb end -compile '/articles/' do +compile %r{/(technical|personal|)articles/(page/|)} 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' + +compile %r(/\d{4}/*) do + filter :rdiscount + layout 'article' + layout 'default' end compile '*' do @@ -44,13 +24,7 @@ compile '*' do 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 +route '*/json/' do item.identifier + 'articles.json' end diff --git a/content/articles.html b/content/articles.html index d762f0f..b297bdf 100644 --- a/content/articles.html +++ b/content/articles.html @@ -1,5 +1,5 @@
- <%= @article[:title] %> - <%= @item[:summary] %> -
-