feed.xml 1.1 KB

1234567891011121314151617181920212223242526272829
  1. ---
  2. layout: null
  3. ---
  4. <?xml version="1.0" encoding="UTF-8"?>
  5. <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  6. <channel>
  7. {% if site.title %}
  8. <title>{{ site.title | xml_escape }}</title>
  9. {% endif %}
  10. {% if site.rss-description %}
  11. <description>{{ site.rss-description | xml_escape }}</description>
  12. {% endif %}
  13. <link>{{ '/' | absolute_url }}</link>
  14. <atom:link href="{{ 'feed.xml' | absolute_url }}" rel="self" type="application/rss+xml" />
  15. {% assign excerpt_length = site.excerpt_length | default: 50 %}
  16. {% for post in site.posts limit:20 %}
  17. <item>
  18. <title>{{ post.title | strip_html | xml_escape }}</title>
  19. <description>
  20. {% if post.subtitle %}{{ post.subtitle | strip_html | xml_escape }} - {% endif %}
  21. {{ post.content | strip_html | xml_escape | truncatewords: excerpt_length }}
  22. </description>
  23. <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
  24. <link>{{ post.url | absolute_url }}</link>
  25. <guid isPermaLink="true">{{ post.url | absolute_url }}</guid>
  26. </item>
  27. {% endfor %}
  28. </channel>
  29. </rss>