Skip to content

Commit

Permalink
Added dc:creator tag to the rss feed for specify the name of the author.
Browse files Browse the repository at this point in the history
Use the rss element in the blog rss handler.
  • Loading branch information
Doug Youch committed Aug 4, 2010
1 parent 31c9d88 commit e87e44e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vendor/modules/blog/app/models/blog/rss_handler.rb
Expand Up @@ -36,7 +36,7 @@ def get_feed
:published_at => post.published_at.to_s(:rfc822),
:description => replace_relative_urls(@options.full ? post.body_content : post.preview)
}
item[:author] = post.author unless post.author.blank?
item[:creator] = post.author unless post.author.blank?
post.blog_categories.each do |cat|
item[:categories] ||= []
item[:categories] << cat.name
Expand Down
5 changes: 4 additions & 1 deletion vendor/modules/feed/app/views/feed/rss/_feed.rxml
@@ -1,6 +1,6 @@
xml.instruct!

xml.rss "version" => "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom" do
xml.rss "version" => "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns:media" => "http://search.yahoo.com/mrss" do

xml.channel do
xml.title(data[:title])
Expand All @@ -17,6 +17,9 @@ xml.channel do
if item[:author]
xml.author item[:author]
end
if item[:creator]
xml.dc(:creator, item[:creator])
end
if item[:categories]
item[:categories].each do |cat|
xml.category cat
Expand Down

0 comments on commit e87e44e

Please sign in to comment.