forked from mmistakes/so-simple-theme
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply author override to posts in feed
- Loading branch information
Showing
1 changed file
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
--- | ||
layout: none | ||
sitemap: false | ||
--- | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> | ||
<title type="text">{{ site.title }}</title> | ||
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator> | ||
<link rel="self" type="application/atom+xml" href="{{ site_url }}/feed.xml" /> | ||
<link rel="alternate" type="text/html" href="{{ site_url }}/" /> | ||
<generator uri="https://github.com/jekyll/jekyll">Jekyll</generator> | ||
<link rel="self" type="application/atom+xml" href="{{ site.url }}/feed.xml" /> | ||
<link rel="alternate" type="text/html" href="{{ site.url }}" /> | ||
<updated>{{ site.time | date_to_xmlschema }}</updated> | ||
<id>{{ site_url }}/</id> | ||
<id>{{ site.url }}/</id> | ||
<author> | ||
<name>{{ site.owner.name }}</name> | ||
<uri>{{ site_url }}/</uri> | ||
<email>{{ site.owner.email }}</email> | ||
<uri>{{ site.url }}/</uri> | ||
{% 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="{% if post.link %}{{ post.link }}{% else %}{{ site_url }}{{ post.url }}{% endif %}"/> | ||
<id>{{ site_url }}{{ post.id }}</id> | ||
<link rel="alternate" type="text/html" href="{{ site.url }}{{ post.url }}" /> | ||
<id>{{ site.url }}{{ post.id }}</id> | ||
{% if post.modified %}<updated>{{ post.modified | to_xmlschema }}T00:00:00-00:00</updated> | ||
<published>{{ post.date | date_to_xmlschema }}</published> | ||
{% else %}<published>{{ post.date | date_to_xmlschema }}</published> | ||
<updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %} | ||
<author> | ||
<name>{{ site.owner.name }}</name> | ||
<uri>{{ site_url }}</uri> | ||
<email>{{ site.owner.email }}</email> | ||
<name>{{ author.name }}</name> | ||
<uri>{{ site.url }}</uri> | ||
{% if author.email %}<email>{{ author.email }}</email>{% endif %} | ||
</author> | ||
{% for tag in post.tags %}<category scheme="{{ site_url }}/tags/#{{ tag | uri_escape }}" term="{{ tag }}" />{% endfor %} | ||
<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> | ||
<content type="html">{{ post.content | xml_escape }} | ||
<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> | ||
</feed> |