From a3e21392944b65eb19ddc794ec69dac67336c298 Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Sun, 15 Jan 2017 13:13:07 -0600 Subject: [PATCH] Site author should utilize author reference --- lib/jekyll-feed/feed.xml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/jekyll-feed/feed.xml b/lib/jekyll-feed/feed.xml index 5fafaa15..d31c6868 100644 --- a/lib/jekyll-feed/feed.xml +++ b/lib/jekyll-feed/feed.xml @@ -19,14 +19,19 @@ {{ site.description | xml_escape }} {% endif %} - {% if site.author %} + {% assign feed_author = site.author | default: site.authors[0] %} + {% if site.data.authors %} + {% assign feed_author = site.data.authors[author] | default: site.author %} + {% endif %} + + {% if feed_author %} - {{ site.author.name | default: site.author | xml_escape }} - {% if site.author.email %} - {{ site.author.email | xml_escape }} + {{ feed_author.name | default: feed_author | xml_escape }} + {% if feed_author.email %} + {{ feed_author.email | xml_escape }} {% endif %} - {% if site.author.uri %} - {{ site.author.uri | xml_escape }} + {% if feed_author.uri %} + {{ feed_author.uri | xml_escape }} {% endif %} {% endif %}