Updated feed.xml
I'm not sure but you guys are using the `jekyll-feed` plugin right? According to my searches, it is outdated... https://github.com/jekyll/jekyll-feed Here it is the updated version: https://github.com/jekyll/jekyll-feed/blob/master/lib/jekyll-feed/feed.xml (included in the code above)
This commit is contained in:
parent
d4260efc2c
commit
631999f206
108
feed.xml
108
feed.xml
|
@ -1,30 +1,84 @@
|
||||||
---
|
---
|
||||||
layout: null
|
layout: null
|
||||||
---
|
---
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
{% if page.xsl %}
|
||||||
<channel>
|
<?xml-stylesheet type="text/xml" href="{{ '/feed.xslt.xml' | absolute_url }}"?>
|
||||||
<title>{{ site.title | xml_escape }}</title>
|
{% endif %}
|
||||||
<description>{{ site.description | xml_escape }}</description>
|
<feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}>
|
||||||
<link>{{ site.url }}/</link>
|
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
|
||||||
<atom:link href="{{ "/feed.xml" }}" rel="self" type="application/rss+xml" />
|
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
|
||||||
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
|
||||||
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||||
<generator>Jekyll v{{ jekyll.version }}</generator>
|
<id>{{ '/' | absolute_url | xml_escape }}</id>
|
||||||
{% for post in site.posts limit:10 %}
|
|
||||||
<item>
|
{% if site.title %}
|
||||||
<title>{{ post.title | xml_escape }}</title>
|
<title type="html">{{ site.title | smartify | xml_escape }}</title>
|
||||||
<description>{{ post.description | xml_escape }}</description>
|
{% elsif site.name %}
|
||||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
<title type="html">{{ site.name | smartify | xml_escape }}</title>
|
||||||
<link>{{ post.url | prepend: site.url }}</link>
|
{% endif %}
|
||||||
<guid isPermaLink="true">{{ post.url | prepend: site.url }}</guid>
|
|
||||||
{% for tag in post.tags %}
|
{% if site.description %}
|
||||||
<category>{{ tag | xml_escape }}</category>
|
<subtitle>{{ site.description | xml_escape }}</subtitle>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
{% for cat in post.categories %}
|
|
||||||
<category>{{ cat | xml_escape }}</category>
|
{% if site.author %}
|
||||||
{% endfor %}
|
<author>
|
||||||
</item>
|
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
|
||||||
{% endfor %}
|
{% if site.author.email %}
|
||||||
</channel>
|
<email>{{ site.author.email | xml_escape }}</email>
|
||||||
</rss>
|
{% endif %}
|
||||||
|
{% if site.author.uri %}
|
||||||
|
<uri>{{ site.author.uri | xml_escape }}</uri>
|
||||||
|
{% endif %}
|
||||||
|
</author>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign posts = site.posts | where_exp: "post", "post.draft != true" %}
|
||||||
|
{% for post in posts limit: 10 %}
|
||||||
|
<entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
|
||||||
|
<title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
|
||||||
|
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
|
||||||
|
<published>{{ post.date | date_to_xmlschema }}</published>
|
||||||
|
<updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
|
||||||
|
<id>{{ post.id | absolute_url | xml_escape }}</id>
|
||||||
|
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
|
||||||
|
|
||||||
|
{% assign post_author = post.author | default: post.authors[0] | default: site.author %}
|
||||||
|
{% assign post_author = site.data.authors[post_author] | default: post_author %}
|
||||||
|
{% assign post_author_email = post_author.email | default: nil %}
|
||||||
|
{% assign post_author_uri = post_author.uri | default: nil %}
|
||||||
|
{% assign post_author_name = post_author.name | default: post_author %}
|
||||||
|
|
||||||
|
<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 }}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for tag in post.tags %}
|
||||||
|
<category term="{{ tag | xml_escape }}" />
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if post.excerpt and post.excerpt != empty %}
|
||||||
|
<summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign post_image = post.image.path | default: post.image %}
|
||||||
|
{% if post_image %}
|
||||||
|
{% unless post_image contains "://" %}
|
||||||
|
{% assign post_image = post_image | absolute_url | xml_escape %}
|
||||||
|
{% endunless %}
|
||||||
|
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image }}" />
|
||||||
|
{% endif %}
|
||||||
|
</entry>
|
||||||
|
{% endfor %}
|
||||||
|
</feed>
|
||||||
|
|
Loading…
Reference in New Issue