Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Author Override for the Feed #71

Merged
merged 2 commits into from
Aug 9, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed wrong author name in feed.xml
  • Loading branch information
soxyl committed Aug 7, 2014
commit f3a937d08e4838e95022ba01e827a26f6fec07f5
12 changes: 8 additions & 4 deletions feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}" />
Expand All @@ -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 }}
&lt;p&gt;&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot;&gt;{{ post.title }}&lt;/a&gt; was originally published by {{ site.owner.name }} at &lt;a href=&quot;{{ site.url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;</content>
&lt;p&gt;&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot;&gt;{{ post.title }}&lt;/a&gt; was originally published by {{ author.name }} at &lt;a href=&quot;{{ site.url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;</content>
</entry>
{% endfor %}
</feed>