Fixed wrong author name in feed.xml
This commit is contained in:
parent
644586e6ae
commit
f3a937d08e
1 changed files with 8 additions and 4 deletions
12
feed.xml
12
feed.xml
|
@ -16,7 +16,11 @@ sitemap: false
|
|||
{% if site.owner.email %}<email>{{ site.owner.email }}</email>{% endif %}
|
||||
</author>
|
||||
{% for post in site.posts limit:20 %}
|
||||
|
||||
{% if post.author %}
|
||||
{% assign author = site.data.authors[post.author] %}
|
||||
{% else %}
|
||||
{% assign author = site.owner %}
|
||||
{% endif %}
|
||||
<entry>
|
||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
||||
<link rel="alternate" type="text/html" href="{{ site.url }}{{ post.url }}" />
|
||||
|
@ -26,12 +30,12 @@ sitemap: false
|
|||
{% else %}<published>{{ post.date | date_to_xmlschema }}</published>
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
|
||||
<author>
|
||||
<name>{{ site.owner.name }}</name>
|
||||
<name>{{ author.name }}</name>
|
||||
<uri>{{ site.url }}</uri>
|
||||
<email>{{ site.owner.email }}</email>
|
||||
<email>{{ author.email }}</email>
|
||||
</author>
|
||||
<content type="html">{{ 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></content>
|
||||
<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></content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
|
|
Loading…
Reference in a new issue