|
@@ -2,25 +2,25 @@
|
2
|
2
|
|
3
|
3
|
;;; Atom and RSS Feeds
|
4
|
4
|
|
5
|
|
-(defclass feed () ((format :initarg :format :reader feed-format)))
|
|
5
|
+(defclass base-feed () ((format :initarg :format :reader feed-format)))
|
6
|
6
|
|
7
|
|
-(defclass standard-feed (index feed) ())
|
|
7
|
+(defclass feed (index base-feed) ())
|
8
|
8
|
|
9
|
|
-(defmethod discover ((doc-type (eql (find-class 'standard-feed))))
|
|
9
|
+(defmethod discover ((doc-type (eql (find-class 'feed))))
|
10
|
10
|
(let ((content (by-date (find-all 'post))))
|
11
|
11
|
(dolist (format '(rss atom))
|
12
|
|
- (let ((feed (make-instance 'standard-feed :format format
|
|
12
|
+ (let ((feed (make-instance 'feed :format format
|
13
|
13
|
:content (take-up-to 10 content)
|
14
|
14
|
:slug (format nil "~(~a~)" format))))
|
15
|
15
|
(add-document feed)))))
|
16
|
16
|
|
17
|
|
-(defmethod publish ((doc-type (eql (find-class 'standard-feed))))
|
18
|
|
- (dolist (feed (find-all 'standard-feed))
|
|
17
|
+(defmethod publish ((doc-type (eql (find-class 'feed))))
|
|
18
|
+ (dolist (feed (find-all 'feed))
|
19
|
19
|
(write-document feed (theme-fn (feed-format feed) "feeds"))))
|
20
|
20
|
|
21
|
21
|
;;; Tag Feeds
|
22
|
22
|
|
23
|
|
-(defclass tag-feed (index feed) ())
|
|
23
|
+(defclass tag-feed (index base-feed) ())
|
24
|
24
|
|
25
|
25
|
(defmethod discover ((doc-type (eql (find-class 'tag-feed))))
|
26
|
26
|
(let ((content (by-date (find-all 'post))))
|