From 5ef09ade7cd403b9130fd6e0367ca85b3ce41ad7 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Mon, 2 Jan 2017 14:37:12 +0100 Subject: [PATCH] Add tagline to feeds --- source/feed.xml.builder | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/feed.xml.builder b/source/feed.xml.builder index 0080006..3092939 100644 --- a/source/feed.xml.builder +++ b/source/feed.xml.builder @@ -14,6 +14,8 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do xml.author { xml.name blog_author.name } @articles[0..9].each do |article| + tagline = "

The post #{h article.title} appeared first on #{h settings.casper[:blog][:url].sub(%r{^https?://}, '')}.

".html_safe + xml.entry do xml.title article.title xml.link "rel" => "alternate", "href" => URI.join(site_url, article.url) @@ -22,7 +24,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do xml.updated File.mtime(article.source_file).iso8601 xml.author { xml.name blog_author(article.data.author).name } xml.summary summary(article), "type" => "html" - xml.content article.body, "type" => "html" + xml.content article.body + tagline, "type" => "html" end end end