Skip to content

Commit 2d8cfb7

Browse files
committed
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
1 parent ae59957 commit 2d8cfb7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

feed.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
---
3+
<?xml version="1.0" encoding="UTF-8" ?>
34
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
45
<channel>
56
<title>{{ site.info.title }}</title>
@@ -10,16 +11,14 @@
1011
<pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
1112
<lastBuildDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
1213

13-
{% for post in site.posts %}
14-
{% unless post.draft %}
14+
{% for post in site.posts limit:20 %}
1515
<item>
1616
<title>{{ post.title }}</title>
1717
<link>{{ site.info.url }}{{ post.url }}</link>
1818
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
1919
<guid>{{ site.info.url }}{{ post.id }}</guid>
20-
<description>{{ post.excerpt | xml_escape }}</description>
20+
<description>{{ post.content | xml_escape }}</description>
2121
</item>
22-
{% endunless %}
2322
{% endfor %}
2423

2524
</channel>

0 commit comments

Comments
 (0)