diff --git a/lib/jekyll-feed/feed.xml b/lib/jekyll-feed/feed.xml index 4d4fd16d..9f6de0cd 100644 --- a/lib/jekyll-feed/feed.xml +++ b/lib/jekyll-feed/feed.xml @@ -56,10 +56,20 @@ {% endunless %} {% assign post_author = post.author | default: post.authors[0] | default: site.author %} + {% if post_author.first %} + {% assign post_author_name = nil %} + {% else %} + {% assign post_author_name = post_author %} + {% endif %} {% assign post_author = site.data.authors[post_author] | default: post_author %} {% assign post_author_email = post_author.email | default: nil %} {% assign post_author_uri = post_author.uri | default: nil %} - {% assign post_author_name = post_author.name | default: post_author %} + {% if post_author.twitter %} + {% assign post_author_twitter = post_author.twitter | prepend: "@" %} + {% else %} + {% assign post_author_twitter = nil %} + {% endif %} + {% assign post_author_name = post_author.name | default: post_author_twitter | default: post_author_name | default: post_author %} {{ post_author_name | default: "" | xml_escape }}