summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Andy Wingo2008-03-02 00:09:22 +0100
committerGravatar Andy Wingo2008-03-02 00:09:22 +0100
commite9849a19cc3b730bc8f3337a04e1a6504a62b0d4 (patch)
tree3df1f2257c633c883eea066e0f5ce700efb5cfa7
parentc2446d0f7f17e9a04f1cec8a2a5c93053b158880 (diff)
downloadtekuti-e9849a19cc3b730bc8f3337a04e1a6504a62b0d4.tar.gz
tekuti-e9849a19cc3b730bc8f3337a04e1a6504a62b0d4.zip
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.
-rw-r--r--tekuti/page-helpers.scm11
1 files 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"))