From e9849a19cc3b730bc8f3337a04e1a6504a62b0d4 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 2 Mar 2008 00:09:22 +0100 Subject: fix up the atom feed * tekuti/page-helpers.scm (atom-header): Set the xml:base to the root url. (atom-entry): Actually include a link to the post. --- tekuti/page-helpers.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tekuti/page-helpers.scm b/tekuti/page-helpers.scm index aee43ac..517e8b9 100644 --- a/tekuti/page-helpers.scm +++ b/tekuti/page-helpers.scm @@ -189,8 +189,7 @@ (define (relurl tail) (string-append "http://" server-name *public-url-base* tail)) `(feed - (@ (xmlns "http://www.w3.org/2005/Atom") - (xml:base ,(relurl "feed/atom"))) + (@ (xmlns "http://www.w3.org/2005/Atom") (xml:base ,(relurl ""))) (title (@ (type "text")) ,*title*) (subtitle (@ (type "text")) ,*subtitle*) (updated ,(timestamp->atom-date last-modified)) @@ -204,12 +203,14 @@ (href ,(relurl "feed/atom")))))) (define (atom-entry server-name post) - (define (relurl tail) - (string-append "http://" server-name *public-url-base* tail)) + (define (relurl . tail) + (apply string-append "http://" server-name *public-url-base* tail)) `(entry (author (name ,*name*) (uri ,(relurl ""))) (title (@ (type "text")) ,(post-title post)) - (id ,(relurl (url:decode (post-key post)))) ;hack + (id ,(relurl (url:decode (post-key post)))) ;hack -- should include archives... + (link (@ (rel "alternate") (type "text/html") + (href ,(relurl "archives/" (url:decode (post-key post)))))) (published ,(timestamp->atom-date (post-timestamp post))) (updated ,(timestamp->atom-date (post-timestamp post))) (content (@ (type "xhtml")) -- cgit v1.2.3-54-g00ecf