From de45c8da454dfda0d06f5624ec01303ac0115cfd Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sat, 5 Dec 2015 23:54:22 +0100 Subject: [PATCH] Render the full content of 10 articles in the feed --- source/feed.xml.builder | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/feed.xml.builder b/source/feed.xml.builder index 3967c5f..93e981a 100644 --- a/source/feed.xml.builder +++ b/source/feed.xml.builder @@ -1,4 +1,4 @@ -@articles ||= blog.articles[0..5] +@articles ||= blog.articles title = settings.casper[:blog][:name] subtitle = settings.casper[:blog][:description] @@ -10,10 +10,10 @@ 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 @articles.first.date.to_time.iso8601 unless @articles.empty? xml.author { xml.name settings.casper[:author][:name] } - @articles.each do |article| + @articles[0..9].each do |article| xml.entry do xml.title article.title xml.link "rel" => "alternate", "href" => URI.join(site_url, article.url) @@ -22,6 +22,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do xml.updated File.mtime(article.source_file).iso8601 xml.author { xml.name settings.casper[:author][:name] } xml.summary summary(article), "type" => "html" + xml.content article.body, "type" => "html" end end end