source: project/gazette/src/feed.atom @ 20060

Last change on this file since 20060 was 20060, checked in by Moritz Heidkamp, 10 years ago

gazette: add permalink to all issues, unlink title, remove title.sxml layout and add rudimentary archive page

File size: 1.4 KB
Line 
1((title . "The Chicken Gazette")
2 (subtitle . "The latest news about all things Chicken")
3 (date . "2010-08-29")
4 (tag . "tag:gazette.call-cc.org,~A:~A")
5 (base-uri . "http://gazette.call-cc.org"))
6
7(let* ((entries (all-issues))
8       (seconds->rfc3339-string (lambda (s)
9                                  (rfc3339->string (seconds->rfc3339 s))))
10       (seconds->YYYY-MM-DD (lambda (s)
11                              (time->string (seconds->utc-time s) "%Y-%m-%d"))))
12
13  (make-atom-doc
14   (make-feed
15    title: (make-title ($ 'title))
16    subtitle: (make-subtitle ($ 'subtitle))
17    icon: (make-icon (conc ($ 'base-uri) "/icon.png"))
18    logo: (make-logo (conc ($ 'base-uri) "/logo.png"))
19    updated: (seconds->rfc3339-string
20              (fold (lambda (p c)
21                      (let ((p ($ 'date p)))
22                        (if (and c (> c p)) c p)))
23                    #f
24                    entries))
25    id: (format ($ 'tag) ($ 'date) "/")
26    links: (list (make-link uri: (conc ($ 'base-uri) (page-path)) relation: "self" type: 'atom))
27    entries: (map (lambda (p)
28                    (make-entry title: (make-title ($ 'title p))
29                                published: (seconds->rfc3339-string ($ 'date p))
30                                updated: (seconds->rfc3339-string (page-updated p))
31                                id: (format ($ 'tag) (seconds->YYYY-MM-DD ($ 'date p)) (page-path p))
32                                links: (list (make-link uri: (conc ($ 'base-uri) (page-path p)) type: 'xhtml))
33                                authors: (map (lambda (author)
34                                                (make-author name: author))
35                                              ($ 'authors p))
36                                content: (make-content (read-page p) type: 'html)))
37                  entries))))
Note: See TracBrowser for help on using the repository browser.