feed.xml 1.2 KB

123456789101112131415161718192021222324252627
  1. ---
  2. layout: null
  3. permalink: /feed.xml
  4. ---
  5. {%- capture newline %}
  6. {% endcapture -%}
  7. <?xml version="1.0" encoding="UTF-8"?>
  8. <feed xmlns="http://www.w3.org/2005/Atom">
  9. <title>{{ site.title }}</title>
  10. <subtitle>{{ site.description }}</subtitle>
  11. <updated>{{ site.time | date_to_xmlschema }}</updated>
  12. <link rel="self" href="{{ page.permalink | xml_escape }}" />
  13. {% for page in site.pages %}{% if page.feed %}
  14. <entry>
  15. <title>{{ page.title | xml_escape }}</title>
  16. <link rel="alternate" href="{{ page.permalink | xml_escape }}"{% if page.lang %} hreflang="{{ page.lang }}"{% endif %} />
  17. <id>{{ page.permalink | xml_escape }}</id>
  18. <published>{{ page.date | date_to_xmlschema }}</published>
  19. <updated>{{ page.updated | default: page.date | date_to_xmlschema }}</updated>
  20. {% if page.description %}<summary>{{ page.description | xml_escape }}</summary>{% endif %}
  21. <content>
  22. {{ page.content | strip_html | replace: newline, " " | slice: 0,250 | xml_escape }}... {{ page.permalink | xml_escape }} {% if page.keywords %}{{ page.keywords | xml_escape }}{% endif %}
  23. </content>
  24. </entry>
  25. {% endif %}{% endfor %}
  26. </feed>