Fix feed/atom

parent 9811ae94
......@@ -22,10 +22,10 @@
(app models posts))
(define (atom-entry post)
(define-syntax-rule (->url blog-url oid)
(format #f "~a/articles/~a" blog-url (uri-decode oid)))
(define-syntax-rule (->url blog-url url-name)
(format #f "~a/archives/~a" blog-url (uri-decode url-name)))
(let* ((meta (post-meta-data post))
(oid (post-oid post))
(url-name (post-url-name post))
(title (meta-data-title meta))
(updated-time (timestamp->atom-date
......@@ -35,9 +35,9 @@
(author (name ,author) (uri ,blog-url))
(title (@ (type "text")) ,title)
(id ,blog-url)
(id ,(string-append blog-url "/")) ; according to W3C validation to end with '/'
(link (@ (rel "alternate") (type "text/html")
(href ,(->url blog-url oid))))
(href ,(->url blog-url url-name))))
(published ,updated-time)
(updated ,updated-time)
(content (@ (type "xhtml"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment