|
@@ -91,12 +91,14 @@
|
91
|
91
|
((format :initform nil :initarg :format :accessor feed-format)))
|
92
|
92
|
|
93
|
93
|
(defmethod page-url ((object feed))
|
94
|
|
- (format nil "~(~a~).xml" (feed-format object)))
|
|
94
|
+ (format nil "~a.xml" (index-slug object)))
|
95
|
95
|
|
96
|
96
|
(defmethod discover ((doc-type (eql (find-class 'feed))))
|
97
|
|
- (let ((content (take-up-to 10 (by-date (find-all 'post)))))
|
|
97
|
+ (let ((content (by-date (find-all 'post))))
|
98
|
98
|
(dolist (format '(rss atom))
|
99
|
|
- (let ((feed (make-instance 'feed :content content :format format)))
|
|
99
|
+ (let ((feed (make-instance 'feed :format format
|
|
100
|
+ :content (take-up-to 10 content)
|
|
101
|
+ :slug (format nil "~(~a~)" format))))
|
100
|
102
|
(add-document feed)))))
|
101
|
103
|
|
102
|
104
|
(defmethod publish ((doc-type (eql (find-class 'feed))))
|
|
@@ -108,16 +110,16 @@
|
108
|
110
|
(defclass tag-feed (feed) ())
|
109
|
111
|
|
110
|
112
|
(defmethod page-url ((object tag-feed))
|
111
|
|
- (format nil "tag/~a~(~a~).xml" (index-slug object) (feed-format object)))
|
|
113
|
+ (format nil "tag/~a.xml" (index-slug object)))
|
112
|
114
|
|
113
|
115
|
(defmethod discover ((doc-type (eql (find-class 'tag-feed))))
|
114
|
116
|
(let ((content (by-date (find-all 'post))))
|
115
|
117
|
(dolist (tag (feeds *config*))
|
116
|
118
|
(let ((tagged (remove-if-not (lambda (x) (tag-p tag x)) content)))
|
117
|
119
|
(dolist (format '(rss atom))
|
118
|
|
- (let ((feed (make-instance 'tag-feed :content (take-up-to 10 tagged)
|
119
|
|
- :format format
|
120
|
|
- :slug tag)))
|
|
120
|
+ (let ((feed (make-instance 'tag-feed :format format
|
|
121
|
+ :content (take-up-to 10 tagged)
|
|
122
|
+ :slug (format nil "~a-~(~a~)" tag format))))
|
121
|
123
|
(add-document feed)))))))
|
122
|
124
|
|
123
|
125
|
(defmethod publish ((doc-type (eql (find-class 'tag-feed))))
|