Fix RSS generation.

This commit is contained in:
Brit Butler 2012-08-22 01:18:18 -04:00
parent 3642094d2b
commit 76ce697921
2 changed files with 8 additions and 9 deletions

View file

@ -30,8 +30,8 @@
:content (xml-escape (post-content post))))))
(render-page "rss.xml"
(funcall (theme-fn "RSS")
:pubdate (make-pubdate)
:title (title *config*)
:siteroot (domain *config*)
:author (author *config*)
:posts content)) t))
(list :pubdate (make-pubdate)
:title (title *config*)
:siteroot (domain *config*)
:author (author *config*)
:posts content)) t)))

View file

@ -7,20 +7,19 @@
<title>{$title}</title>
<link>{$siteroot}</link>
<atom:link href="{$siteroot}/rss.xml" rel="self" type="application/rss+xml" />
<description>{$title}</description>
<language>en-us</language>
<pubDate>{$pubdate}</pubDate>
{foreach $post in $posts}
<item>
<title>{$post.title}</title>
<link>{$siteroot}/{$post.url}</link>
<link>{$siteroot}/posts/{$post.url}</link>
<pubDate>{$post.date}</pubDate>
<author>{$author}</author>
{foreach $tag in $tags}
<guid isPermaLink="true">{$siteroot}/posts/{$post.url}</guid>
{foreach $tag in $post.tags}
<category>{$tag |noAutoescape}</category>
{/foreach}
<guid isPermaLink="true">{$siteroot}/{$post.url}</guid>
<content:encoded>{$post.content |noAutoescape}</content:encoded>
</item>
{/foreach}