Skip to content
Browse files

Add an ATOM feed.

  • Loading branch information...
1 parent 80fbf0a commit 7e8b60db60e7ea6b387a504b879054e59dfb319a @sjl committed Jan 8, 2010
Showing with 44 additions and 31 deletions.
  1. +1 −0 content/feed.html
  2. +1 −1 layout/_splash.html
  3. +41 −29 layout/skeleton/_atom.xml
  4. +1 −1 layout/skeleton/_base.html
View
1 content/feed.html
@@ -0,0 +1 @@
+{% extends "skeleton/_atom.xml" %}
View
2 layout/_splash.html
@@ -8,7 +8,7 @@
<li>What makes me tick. &raquo;</li>
<li>Some things I’ve made. &raquo;</li>
<li>More about me. &raquo;</li>
- <li>Feeds. &raquo;</li>
+ <li>Atom feed. &raquo;</li>
</ul>
</div>
{% endfilter %}
View
70 layout/skeleton/_atom.xml
@@ -1,32 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
-{%spaceless%}
+
+{% spaceless %}
+
<feed xmlns="http://www.w3.org/2005/Atom">
- <title>{% block title %}{{site.name}} {{page.node.name}}{%endblock%}</title>
- {%block self_url %}
- <link href="{{page.node.full_url}}/atom.xml" rel="self"/>
- {%endblock%}
- {%block site_url %}
- <link href="{{site.full_url}}"/>
- {%endblock%}{%block feed_extra%}{%endblock%}
- <updated>{{now|xmldatetime}}</updated>
- <id>{{site.full_url}}</id>
- {% for node_page in page.node.walk_pages %}
- {% ifnotequal node_page page %}
- {% if not node_page.listing and not node_page.exclude %}
- <entry>
- <title>{{node_page.title}}</title>
- <author><name>Lakshmi Vyas</name></author>
- <link href="{{node_page.full_url}}"/>
- <updated>{{node_page.updated|default:node_page.created|xmldatetime}}</updated>
- <published>{{node_page.created|xmldatetime}}</published>
- <id>{{node_page.full_url}}</id>
- {%block entry_extra%}{%endblock%}
- <content type="html">
- {%filter force_escape%}{% render_article node_page %}{%endfilter%}
- </content>
- </entry>
- {%endif%}
- {%endifnotequal%}
- {% endfor %}
+ <title>{% block title %}{{ site.name }}{% endblock %}</title>
+
+ {% block self_url %}
+ <link href="{{ page.node.full_url }}/feed/" rel="self" />
+ {% endblock %}
+
+ {% block site_url %}
+ <link href="{{ site.full_url }}"/>
+ {% endblock %}
+
+ {% block feed_extra %}{% endblock %}
+
+ <updated>{{ now|xmldatetime }}</updated>
+
+ <id>{{ site.full_url }}/</id>
+
+ {% for node_page in page.node.walk_pages %}
+ {% ifnotequal node_page page %}
+ {% if not node_page.listing and not node_page.exclude %}
+ <entry>
+ <title type="html">{{ node_page.title }}</title>
+ <author><name>{{ site.author }}</name></author>
+ <link href="{{ node_page.full_url }}"/>
+ <updated>{{ node_page.created|xmldatetime }}</updated>
+ <published>{{ node_page.created|xmldatetime }}</published>
+ <id>{{ node_page.full_url }}</id>
+ {% block entry_extra %}{% endblock %}
+ <content type="html">
+ {% filter force_escape %}
+ {% render_article node_page %}
+ {% endfilter %}
+ </content>
+ </entry>
+ {%endif%}
+ {%endifnotequal%}
+ {% endfor %}
</feed>
-{%endspaceless%}
+
+{% endspaceless %}
View
2 layout/skeleton/_base.html
@@ -51,7 +51,7 @@
<li><a href="http://bitbucket.org/sjl/">Code</a></li>
<li><a href="/projects">Projects</a></li>
<li><a href="/about/">About</a></li>
- <li><a href="/rss/">RSS</a></li>
+ <li><a href="/feed/">Feed</a></li>
</ul>
</div>

0 comments on commit 7e8b60d

Please sign in to comment.
Something went wrong with that request. Please try again.