| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0"
- xmlns:atom="http://www.w3.org/2005/Atom"
- xmlns:content="http://purl.org/rss/1.0/modules/content/">
- <channel>
- <title>{{ config.title }}</title>
- <link>{{ url | uriencode }}</link>
- <atom:link href="{{ feed_url | uriencode }}" rel="self" type="application/rss+xml"/>
- {% if config.feed.hub %}<atom:link href="{{ config.feed.hub | uriencode }}" rel="hub"/>{% endif %}
- <description>{{ config.description }}</description>
- <pubDate>{{ posts.first().updated.toDate().toUTCString() }}</pubDate>
- <generator>http://hexo.io/</generator>
- {% for post in posts.toArray() %}
- <item>
- <title>{{ post.title }}</title>
- <link>{{ (url + post.path) | uriencode }}</link>
- <guid>{{ (url + post.path) | uriencode }}</guid>
- <pubDate>{{ post.date.toDate().toUTCString() }}</pubDate>
- <description>
- {% if post.description %}
- {{ post.description }}
- {% elif post.excerpt %}
- {{ post.excerpt }}
- {% elif post.content %}
- {% set short_content = post.content.substring(0, config.feed.content_limit) %}
- {% if config.feed.content_limit_delim %}
- {% set delim_pos = short_content.lastIndexOf(config.feed.content_limit_delim) %}
- {% if delim_pos > -1 %}
- {{ short_content.substring(0, delim_pos) }}
- {% else %}
- {{ short_content }}
- {% endif %}
- {% else %}
- {{ short_content }}
- {% endif %}
- {% endif %}
- </description>
- {% if config.feed.content and post.content %}
- <content:encoded><![CDATA[{{ post.content | noControlChars | safe }}]]></content:encoded>
- {% endif %}
- {% if post.comments %}<comments>{{ (url + post.path) | uriencode }}#disqus_thread</comments>{% endif %}
- </item>
- {% endfor %}
- </channel>
- </rss>
|