Browse Source

better rss feed

Dean Attali 4 years ago
parent
commit
9668c2a5b2
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      feed.xml

+ 6
- 3
feed.xml View File

@@ -8,14 +8,17 @@ layout: null
8 8
     <description>{{ site.description | xml_escape }}</description>
9 9
     <link>{{ site.url }}</link>
10 10
     <atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
11
-    {% for post in site.posts limit:10 %}
11
+    {% for post in site.posts limit:20 %}
12 12
       <item>
13 13
         <title>{{ post.title | xml_escape }}</title>
14
-        <description>{{ post.content | xml_escape }}</description>
14
+        <description>
15
+          {% if post.subtitle %}{{ post.subtitle | xml_escape }} - {% endif %}
16
+          {{ post.content | strip_html | xml_escape | truncatewords: 50 }}
17
+        </description>
15 18
         <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
16 19
         <link>{{ site.url }}{{ post.url }}</link>
17 20
         <guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
18 21
       </item>
19 22
     {% endfor %}
20 23
   </channel>
21
-</rss>
24
+</rss>

Loading…
Cancel
Save