New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix feed.xml.builder breaking on empty blogs #155

Merged
merged 1 commit into from Sep 17, 2013
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Diff settings

Always

Just for now

Fix feed.xml.builder breaking on empty blogs

  • Loading branch information...
barraponto committed Sep 6, 2013
commit e5d9b5c5bb5acad9cc4845d7bed8dca1cdef3eff
@@ -6,7 +6,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.id URI.join(site_url, blog.options.prefix.to_s)
xml.link "href" => URI.join(site_url, blog.options.prefix.to_s)
xml.link "href" => URI.join(site_url, current_page.path), "rel" => "self"
xml.updated blog.articles.first.date.to_time.iso8601
xml.updated(blog.articles.first.date.to_time.iso8601) unless blog.articles.empty?
xml.author { xml.name "Blog Author" }
blog.articles[0..5].each do |article|
@@ -20,5 +20,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
# xml.summary article.summary, "type" => "html"
xml.content article.body, "type" => "html"
end
end
end unless blog.articles.empty?
end
ProTip! Use n and p to navigate between commits in a pull request.