Replace bespoke feed.xml with jekyll-feed plugin
This commit is contained in:
parent
3b0f42d9bc
commit
1c300ef040
2 changed files with 1 additions and 43 deletions
|
@ -150,6 +150,7 @@ gems:
|
||||||
- jekyll-paginate
|
- jekyll-paginate
|
||||||
- jekyll-sitemap
|
- jekyll-sitemap
|
||||||
- jekyll-gist
|
- jekyll-gist
|
||||||
|
- jekyll-feed
|
||||||
|
|
||||||
# Outputting
|
# Outputting
|
||||||
permalink: /:categories/:title/
|
permalink: /:categories/:title/
|
||||||
|
|
43
feed.xml
43
feed.xml
|
@ -1,43 +0,0 @@
|
||||||
---
|
|
||||||
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/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>
|
|
||||||
<author>
|
|
||||||
<name>{{ site.owner.name }}</name>
|
|
||||||
<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="{{ 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>{{ author.name }}</name>
|
|
||||||
<uri>{{ site.url }}</uri>
|
|
||||||
{% if author.email %}<email>{{ author.email }}</email>{% endif %}
|
|
||||||
</author>
|
|
||||||
<content type="html">
|
|
||||||
{{ post.content | xml_escape }}
|
|
||||||
{% include feed-footer.html %}
|
|
||||||
</content>
|
|
||||||
</entry>
|
|
||||||
{% endfor %}
|
|
||||||
</feed>
|
|
Loading…
Reference in a new issue