File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 3535 (content ([type "html " ]) ,(xexpr->string `(article ,@body))))))]
3636
3737 ['rss
38- (define updated (post-date->string (rendered-post-date (first posts))))
38+ (define updated (post-date->rfc-822-date (rendered-post-date (first posts))))
3939 `(rss ([version "2.0 " ])
4040 (channel
4141 (title ,(index-page-title #:tag tag ))
5050 (title ,title-str)
5151 (link ,(full-url (rendered-post-path post)))
5252 (guid ([isPermaLink "true " ]) ,(full-url (rendered-post-path post)))
53- (pubDate ,(post-date->string date))
53+ (pubDate ,(post-date->rfc-822-date date))
5454 (description ,(xexpr->string `(article ,@body)))))))]))
5555
5656(define (post-date->rfc-3339-datetime date)
5757 (~a (post-date->string date) "T00:00:00Z " ))
58+
59+ ;; The RSS spec demands that dates be in this somewhat odd RFC 822 format, and
60+ ;; this appears to be important for at least some actual RSS implementations;
61+ ;; see lexi-lambda.github.io#10.
62+ (define (post-date->rfc-822-date date)
63+ (~a (~r (post-date-day date) #:min-width 2 #:pad-string "0 " )
64+ " " (vector-ref #("Jan " "Feb " "Mar " "Apr " "May " "Jun " "Jul " "Aug " "Sep " "Oct " "Nov " "Dec " )
65+ (sub1 (post-date-month date)))
66+ " " (post-date-year date)))
You can’t perform that action at this time.
0 commit comments