From cc96b926521630306d823e7011feb505fdeda911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=9C=CE=B1=CE=BA=CE=B1=CF=81=CF=8C=CE=BD=CE=B9=CE=B1=20?= =?UTF-8?q?=CE=BC=CE=B5?= <32320229+makaroniame@users.noreply.github.com> 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 948c52bfae23..467c71addf8d 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 %}