atom.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. ---
  3. <?xml version="1.0" encoding="UTF-8"?>
  4. <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  5. <channel>
  6. <title>{{ site.name | xml_escape }}</title>
  7. <description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
  8. <link>{{ site.url }}</link>
  9. <id>{{ site.url }}</id>
  10. <updated>{{ site.time | date_to_xmlschema }}</updated>
  11. <author>
  12. <name>{{ site.name }}</name>
  13. <email>bbxdesign@gmail.com</email>
  14. </author>
  15. <atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
  16. {% for post in site.posts limit:10 %}
  17. <item>
  18. <title>{{ post.title | xml_escape }}</title>
  19. {% if post.author.name %}
  20. <dc:creator>{{ post.author.name | xml_escape }}</dc:creator>
  21. {% endif %}
  22. {% if post.introduction %}
  23. <description>{{ post.introduction | xml_escape }}</description>
  24. {% else %}
  25. <description>{{ post.content | xml_escape }}</description>
  26. {% endif %}
  27. <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
  28. <link>{{ site.url }}{{ post.url }}</link>
  29. <guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
  30. </item>
  31. {% endfor %}
  32. </channel>
  33. </rss>