Permalink
Browse files

RSS feed fixes.

- Add XML declaration line
- Remove unneeded "unless post.draft" conditional
- Include entire post content in description. This allows RSS readers to display the entire story.
- Limit to last 20 posts
  • Loading branch information...
willkoehler committed Aug 29, 2014
1 parent ae59957 commit 2d8cfb7629cde63dc31a8bbbb11d9e5e62b90d18
Showing with 3 additions and 4 deletions.
  1. +3 −4 feed.xml
View
@@ -1,5 +1,6 @@
---
---
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.info.title }}</title>
@@ -10,16 +11,14 @@
<pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<lastBuildDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
{% for post in site.posts %}
{% unless post.draft %}
{% for post in site.posts limit:20 %}
<item>
<title>{{ post.title }}</title>
<link>{{ site.info.url }}{{ post.url }}</link>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<guid>{{ site.info.url }}{{ post.id }}</guid>
<description>{{ post.excerpt | xml_escape }}</description>
<description>{{ post.content | xml_escape }}</description>
</item>
{% endunless %}
{% endfor %}
</channel>

0 comments on commit 2d8cfb7

Please sign in to comment.