Commits

Alexander Solovyov  committed e13703b

update feed.atom

  • Participants
  • Parent commits f03d71e

Comments (0)

Files changed (1)

File content/feed.atom

+{# -*- mode: django-html -*- #}{% meta %}
+  isdir: False
+  parent_tmpl: _empty.html
+{% endmeta %}
+
+{% block content -%}
 <?xml version="1.0" encoding="utf-8"?>
 <feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
-  <id>{{ site.url }}</id>
+  <id>{{ site.base }}{{ site.url }}</id>
   <title>{{ site.title }}</title>
-  {% if site.entries -%}
-  <updated>{{ site.entries[0].mtime|rfc3339 }}</updated>
+  {% if site.latest_post -%}
+  <updated>{{ site.latest_post.mtime|rfc3339 }}</updated>
   {%- endif %}
   <author>
     <name>{{ site.author }}</name>
   </author>
-  <link href="{{ site.url }}" rel="alternate"></link>
-  <link href="{{ entry.get_absolute_url() }}" rel="self"></link>
+  <link href="{{ site.base }}{{ site.url }}" rel="alternate"></link>
   <generator uri="http://hg.piranha.org.ua/cyrax/">cyrax</generator>
 
-{% for post in site.posts %}
+{%- for post in site.posts[:5] %}
   <entry>
     <id>{{ post.get_absolute_url() }}</id>
     <title type="html">{{ post.title|e }}</title>
-    <updated>{{ post.mtime|rfc3339 }}</updated>
+    <updated>{{ post.updated|default(post.date)|rfc3339 }}</updated>
     <published>{{ post.date|rfc3339 }}</published>
     {% for tag in post.tags -%}
     <category term="{{ tag }}"></category>
     {%- endfor %}
-    <link href="{{ post.get_absolute_url() }}" rel="alternate"></link>
+    <link href="{{ site.base }}{{ post.get_absolute_url() }}" rel="alternate"></link>
     <content type="html">{{ post.body|e }}</content>
   </entry>
 {% endfor %}
 </feed>
+{%- endblock %}