Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
vendor/plugins/news/app/views/news_items/index.rss.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
xml.instruct! :xml, :version => "1.0" | ||
xml.rss :version => "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom" do | ||
xml.channel do | ||
# Required to pass W3C validation. | ||
xml.atom :link, nil, { | ||
:href => news_items_url(:format => 'rss'), | ||
:rel => 'self', :type => 'application/rss+xml' | ||
} | ||
|
||
# Feed basics. | ||
xml.title page_title | ||
xml.description @page[:body].gsub(/<\/?[^>]*>/, "") | ||
xml.link news_items_url(:format => 'rss') | ||
|
||
# News items. | ||
@news_items.each do |news_item| | ||
xml.item do | ||
xml.title news_item.title | ||
xml.link news_item_url(news_item) | ||
xml.pubDate news_item.publish_date.to_s(:rfc822) | ||
xml.guid news_item_url(news_item) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters