Some changes for feed-related markup
Getty Ritter
9 years ago
45 | 45 | (map (lambda (file-entry) |
46 | 46 | (let* ((filename (string-append "posts/" (car file-entry))) |
47 | 47 | (telml (translate-file filename)) |
48 | (metadata (telml-meta telml))) | |
49 | (make-post filename | |
50 | (localtime (stat:mtime (cadr file-entry))) | |
51 | (meta-slug metadata) | |
52 | (meta-title metadata) | |
53 | (meta-tags metadata) | |
54 | (telml-content telml)))) | |
55 | files-sorted))) | |
56 | ||
57 | ;; This should be factored out better, but for now... eh... | |
58 | (define (get-all-feed-posts) | |
59 | (let* ((files (cddr (file-system-tree "posts"))) | |
60 | (files-sorted (sort files (lambda (x y) | |
61 | (> (stat:mtime (cadr x)) | |
62 | (stat:mtime (cadr y))))))) | |
63 | (map (lambda (file-entry) | |
64 | (let* ((filename (string-append "posts/" (car file-entry))) | |
65 | (telml (translate-feed-file filename)) | |
48 | 66 | (metadata (telml-meta telml))) |
49 | 67 | (make-post filename |
50 | 68 | (localtime (stat:mtime (cadr file-entry))) |
122 | 140 | (map mk-tag-page tags))) |
123 | 141 | |
124 | 142 | (define (feed) |
125 |
(let ((posts (get-all- |
|
143 | (let ((posts (get-all-feed-posts))) | |
126 | 144 | (with-output-to-file "output/feed.xml" |
127 | 145 | (lambda () |
128 | 146 | (display (serialize-sxml (atom-feed posts))))))) |