feed.xml 1.0 KB

12345678910111213141516171819202122232425262728
  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.description %}
  11. <description>{{ site.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. {% for post in site.posts limit:20 %}
  16. <item>
  17. <title>{{ post.title | xml_escape }}</title>
  18. <description>
  19. {% if post.subtitle %}{{ post.subtitle | xml_escape }} - {% endif %}
  20. {{ post.content | strip_html | xml_escape | truncatewords: 50 }}
  21. </description>
  22. <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
  23. <link>{{ post.url | absolute_url }}</link>
  24. <guid isPermaLink="true">{{ post.url | absolute_url }}</guid>
  25. </item>
  26. {% endfor %}
  27. </channel>
  28. </rss>