Browse Source

Merge pull request #176 from jd/master

Fix Atom feed title generation
main
Lakshmi Vyas 11 years ago
parent
commit
febfc69797
2 changed files with 11 additions and 1 deletions
  1. +1
    -1
      hyde/layouts/basic/layout/atom.j2
  2. +10
    -0
      hyde/site.py

+ 1
- 1
hyde/layouts/basic/layout/atom.j2 View File

@@ -21,7 +21,7 @@

{% for res in resource.node.walk_resources_sorted_by_time() %}
<entry>
<title type="html">{{ res.meta.title }}</title>
<title type="html">{{ res.meta.title|forceescape }}</title>
<author><name>{{ res.meta.author }}</name></author>
<link href="{{ content_url(res.url) }}"/>
<updated>{{ res.meta.created|xmldatetime }}</updated>


+ 10
- 0
hyde/site.py View File

@@ -192,6 +192,16 @@ class Node(Processable):
for node in child.walk():
yield node

def rwalk(self):
"""
Walk the node upward, first yielding itself then
yielding its parents.
"""
x = self
while x:
yield x
x = x.parent

def walk_resources(self):
"""
Walks the resources in this hierarchy.


Loading…
Cancel
Save