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