Skip to content

Commit

Permalink
Merge pull request #152 from jekyll/pull/default-author
Browse files Browse the repository at this point in the history
Merge pull request 152
  • Loading branch information
jekyllbot authored Jan 15, 2017
2 parents 9f35195 + 98362a2 commit e5c1256
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions lib/jekyll-feed/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@
{% assign post_author_uri = post_author.uri | default: nil %}
{% assign post_author_name = post_author.name | default: post_author %}

{% if post_author %}
<author>
<name>{{ post_author_name | xml_escape }}</name>
{% if post_author_email %}
<email>{{ post_author_email | xml_escape }}</email>
{% endif %}
{% if post_author_uri %}
<uri>{{ post_author_uri | xml_escape }}</uri>
{% endif %}
</author>
{% endif %}
<author>
<name>{{ post_author_name | default: "" | xml_escape }}</name>
{% if post_author_email %}
<email>{{ post_author_email | xml_escape }}</email>
{% endif %}
{% if post_author_uri %}
<uri>{{ post_author_uri | xml_escape }}</uri>
{% endif %}
</author>

{% if post.category %}
<category term="{{ post.category | xml_escape }}" />
Expand Down

0 comments on commit e5c1256

Please sign in to comment.