Incorporates #157 from @dieyushi and #215 from @miguelos. In a nutshell: limit RSS feeds to 20, correct some bathing issues, format timestamps, shorten TTL.

This commit is contained in:
Joseph Hall 2015-05-23 09:55:40 -05:00
parent 3e239c9432
commit 221a8f6451
2 changed files with 9 additions and 9 deletions

4
atom.xml Normal file → Executable file
View file

@ -6,7 +6,7 @@ title : Atom Feed
<feed xmlns="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title | xml_escape }}</title> <title>{{ site.title | xml_escape }}</title>
<link href="{{ site.production_url }}/{{ site.atom_path }}" rel="self"/> <link href="{{ site.production_url }}{{ site.JB.atom_path }}" rel="self"/>
<link href="{{ site.production_url }}"/> <link href="{{ site.production_url }}"/>
<updated>{{ site.time | date_to_xmlschema }}</updated> <updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.production_url }}</id> <id>{{ site.production_url }}</id>
@ -15,7 +15,7 @@ title : Atom Feed
<email>{{ site.author.email }}</email> <email>{{ site.author.email }}</email>
</author> </author>
{% for post in site.posts %} {% for post in site.posts limit:20 %}
<entry> <entry>
<title>{{ post.title | xml_escape }}</title> <title>{{ post.title | xml_escape }}</title>
<link href="{{ site.production_url }}{{ post.url }}"/> <link href="{{ site.production_url }}{{ post.url }}"/>

14
rss.xml Normal file → Executable file
View file

@ -4,23 +4,23 @@ title : RSS Feed
--- ---
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>{{ site.title | xml_escape }}</title> <title>{{ site.title | xml_escape }}</title>
<description>{{ site.title | xml_escape }} - {{ site.author.name | xml_escape }}</description> <description>{{ site.title | xml_escape }} - {{ site.author.name | xml_escape }}</description>
<link>{{ site.production_url }}{{ site.rss_path }}</link>
<link>{{ site.production_url }}</link> <link>{{ site.production_url }}</link>
<lastBuildDate>{{ site.time | date_to_xmlschema }}</lastBuildDate> <atom:link href="{{ site.production_url }}{{ site.JB.rss_path }}" rel="self" type="application/rss+xml" />
<pubDate>{{ site.time | date_to_xmlschema }}</pubDate> <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<ttl>1800</ttl> <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<ttl>60</ttl>
{% for post in site.posts %} {% for post in site.posts limit:20 %}
<item> <item>
<title>{{ post.title | xml_escape }}</title> <title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description> <description>{{ post.content | xml_escape }}</description>
<link>{{ site.production_url }}{{ post.url }}</link> <link>{{ site.production_url }}{{ post.url }}</link>
<guid>{{ site.production_url }}{{ post.id }}</guid> <guid>{{ site.production_url }}{{ post.id }}</guid>
<pubDate>{{ post.date | date_to_xmlschema }}</pubDate> <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
</item> </item>
{% endfor %} {% endfor %}