Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added author node to feed xml and fixed xml.id

  • Loading branch information...
commit 341bd5d06533ca2ec3ee8241e2f0d94cfaf74ba1 1 parent 3b0b9e4
@AdrianSmith AdrianSmith authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 app/views/posts/feed.xml.builder
View
13 app/views/posts/feed.xml.builder
@@ -3,15 +3,24 @@ xml.feed :xmlns => 'http://www.w3.org/2005/Atom' do
xml.title Postmarkdown::Config.options[:feed_title]
xml.link :href => posts_feed_url, :rel => :self, :type => 'application/atom+xml'
xml.link :href => posts_url, :rel => :alternate, :type => 'text/html'
- xml.id root_url
+ xml.id posts_url
xml.updated Post.feed_last_modified.xmlschema
+
Post.feed.each do |post|
xml.entry do
xml.title post.title, :type => :text
xml.link :href => post_url(post), :rel => :alternate, :type => 'text/html'
xml.published post.timestamp.xmlschema
xml.updated post.last_modified.xmlschema
- xml.id post.slug
+
+ if post.author.present?
+ xml.author do
+ xml.name post.author
+ xml.email post.email if post.email.present?
+ end
+ end
+
+ xml.id post_url(post)
xml.content :type => :html, 'xml:base' => post_url(post) do
xml.cdata! post.content_html
end
Please sign in to comment.
Something went wrong with that request. Please try again.