2c968f6a038b

Add an ATOM feed.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 08 Jan 2010 18:26:10 -0500
parents 467bf986634a
children b1426357f483
branches/tags (none)
files content/feed.html layout/_splash.html layout/skeleton/_atom.xml layout/skeleton/_base.html

Changes

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/content/feed.html	Fri Jan 08 18:26:10 2010 -0500
@@ -0,0 +1,1 @@
+{% extends "skeleton/_atom.xml" %}
\ No newline at end of file
--- a/layout/_splash.html	Thu Jan 07 19:15:12 2010 -0500
+++ b/layout/_splash.html	Fri Jan 08 18:26:10 2010 -0500
@@ -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 %}
--- a/layout/skeleton/_atom.xml	Thu Jan 07 19:15:12 2010 -0500
+++ b/layout/skeleton/_atom.xml	Fri Jan 08 18:26:10 2010 -0500
@@ -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%}
\ No newline at end of file
+
+{% endspaceless %}
\ No newline at end of file
--- a/layout/skeleton/_base.html	Thu Jan 07 19:15:12 2010 -0500
+++ b/layout/skeleton/_base.html	Fri Jan 08 18:26:10 2010 -0500
@@ -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>