Gestion des feeds fr et en
This commit is contained in:
parent
2c0bfbd5e8
commit
dbd094dfbb
4 changed files with 11 additions and 3 deletions
5
Rules
5
Rules
|
@ -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
7
content/xml/fr/feed.html
Normal 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.
|
|
@ -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}\// } }) %>
|
||||
|
|
Loading…
Reference in a new issue