From ad03da8ca9a93160b49adf437555b248add8aaa8 Mon Sep 17 00:00:00 2001 From: Nala Ginrut Date: Mon, 2 Dec 2019 15:07:45 +0800 Subject: [PATCH] Atom id must be a full and valid URL --- app/controllers/feed.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/feed.scm b/app/controllers/feed.scm index 9587df7..551c553 100644 --- a/app/controllers/feed.scm +++ b/app/controllers/feed.scm @@ -23,7 +23,7 @@ (define (atom-entry post) (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)) (url-name (post-url-name post)) (title (meta-data-title meta)) @@ -31,13 +31,15 @@ (string->number (meta-data-timestamp meta)))) (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 (author (name ,author) (uri ,blog-url)) (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") - (href ,(->url blog-url url-name)))) + (href ,real-url))) (published ,updated-time) (updated ,updated-time) (content (@ (type "xhtml")) -- GitLab