Atom id must be a full and valid URL

parent 5cf56fd7
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
(define (atom-entry post) (define (atom-entry post)
(define-syntax-rule (->url blog-url url-name) (define-syntax-rule (->url blog-url url-name)
(format #f "~a/archives/~a" blog-url (uri-decode url-name))) (format #f "~a/archives/~a/" blog-url (uri-decode url-name)))
(let* ((meta (post-meta-data post)) (let* ((meta (post-meta-data post))
(url-name (post-url-name post)) (url-name (post-url-name post))
(title (meta-data-title meta)) (title (meta-data-title meta))
...@@ -31,13 +31,15 @@ ...@@ -31,13 +31,15 @@
(string->number (string->number
(meta-data-timestamp meta)))) (meta-data-timestamp meta))))
(blog-url (colt-conf-get 'blog-url)) (blog-url (colt-conf-get 'blog-url))
(author (colt-conf-get 'blog-author))) (author (colt-conf-get 'blog-author))
(real-url (->url blog-url url-name)))
`(entry `(entry
(author (name ,author) (uri ,blog-url)) (author (name ,author) (uri ,blog-url))
(title (@ (type "text")) ,(if (string-null? title) "No title" title)) (title (@ (type "text")) ,(if (string-null? title) "No title" title))
(id ,(post-oid post)) ;; id must be a full and valid URL
(id ,real-url)
(link (@ (rel "alternate") (type "text/html") (link (@ (rel "alternate") (type "text/html")
(href ,(->url blog-url url-name)))) (href ,real-url)))
(published ,updated-time) (published ,updated-time)
(updated ,updated-time) (updated ,updated-time)
(content (@ (type "xhtml")) (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