Gestion des feeds fr et en

This commit is contained in:
Yann Esposito (Yogsototh) 2010-04-02 12:44:33 +02:00
parent 2c0bfbd5e8
commit dbd094dfbb
4 changed files with 11 additions and 3 deletions

5
Rules
View file

@ -67,14 +67,15 @@ route '/html/*' do
'/Scratch' + item.identifier.sub('/html','') + 'index.html'
end
# feed
compile '/xml/*' do
layout 'feed'
end
route '/xml/*' do
route '/xml/en/*' do
'/Scratch/en/feed.xml'
end
route '/xml/*' do
route '/xml/fr/*' do
'/Scratch/fr/feed.xml'
end

7
content/xml/fr/feed.html Normal file
View file

@ -0,0 +1,7 @@
---
title: "Yogsototh's last blogs entries"
author_name: "Yann Esposito"
feed_url: "http://feeds.feedburner.com/yannespositocomfr"
---
Utilisé pour engendrer mes feeds.

View file

@ -1,4 +1,4 @@
-----
-----
<% language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'') %>
<%= atom_feed({:articles => articles.find{ |x| x.reps[0].path =~ /\/#{language}\// } })%>
<%= atom_feed({:articles => articles.select { |a| a.reps[0].path =~ /\/#{language}\// } }) %>