From f3a937d08e4838e95022ba01e827a26f6fec07f5 Mon Sep 17 00:00:00 2001 From: Samuel Wicky Date: Thu, 7 Aug 2014 19:39:45 +0300 Subject: [PATCH] Fixed wrong author name in feed.xml --- feed.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/feed.xml b/feed.xml index 948c52bf..467c71ad 100644 --- a/feed.xml +++ b/feed.xml @@ -16,7 +16,11 @@ sitemap: false {% if site.owner.email %}{{ site.owner.email }}{% endif %} {% for post in site.posts limit:20 %} - +{% if post.author %} + {% assign author = site.data.authors[post.author] %} +{% else %} + {% assign author = site.owner %} +{% endif %} <![CDATA[{{ post.title | cdata_escape }}]]> @@ -26,12 +30,12 @@ sitemap: false {% else %}{{ post.date | date_to_xmlschema }} {{ post.date | date_to_xmlschema }}{% endif %} - {{ site.owner.name }} + {{ author.name }} {{ site.url }} - {{ site.owner.email }} + {{ author.email }} {{ post.content | xml_escape }} - <p><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a> was originally published by {{ site.owner.name }} at <a href="{{ site.url }}">{{ site.title }}</a> on {{ post.date | date: "%B %d, %Y" }}.</p> + <p><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a> was originally published by {{ author.name }} at <a href="{{ site.url }}">{{ site.title }}</a> on {{ post.date | date: "%B %d, %Y" }}.</p> {% endfor %}