Browse Source

Fix feed handling bug backwards compatibly. No name changes.

Brit Butler 10 years ago
parent
commit
1b3acd107e
2 changed files with 8 additions and 8 deletions
  1. 1 1
      examples/example.coleslawrc
  2. 7 7
      src/feeds.lisp

+ 1 - 1
examples/example.coleslawrc

14
            (:tag-index      "tag/~a")
14
            (:tag-index      "tag/~a")
15
            (:month-index    "date/~a")
15
            (:month-index    "date/~a")
16
            (:numeric-index  "~d")
16
            (:numeric-index  "~d")
17
-           (:standard-feed  "~a.xml")
17
+           (:feed           "~a.xml")
18
            (:tag-feed       "tag/~a.xml"))
18
            (:tag-feed       "tag/~a.xml"))
19
  :sitenav ((:url "http://redlinernotes.com/" :name "Home")
19
  :sitenav ((:url "http://redlinernotes.com/" :name "Home")
20
            (:url "http://twitter.com/redline6561" :name "Twitter")
20
            (:url "http://twitter.com/redline6561" :name "Twitter")

+ 7 - 7
src/feeds.lisp

2
 
2
 
3
 ;;; Atom and RSS Feeds
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
   (let ((content (by-date (find-all 'post))))
10
   (let ((content (by-date (find-all 'post))))
11
     (dolist (format '(rss atom))
11
     (dolist (format '(rss atom))
12
-      (let ((feed (make-instance 'standard-feed :format format
12
+      (let ((feed (make-instance 'feed :format format
13
                                  :content (take-up-to 10 content)
13
                                  :content (take-up-to 10 content)
14
                                  :slug (format nil "~(~a~)" format))))
14
                                  :slug (format nil "~(~a~)" format))))
15
         (add-document feed)))))
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
     (write-document feed (theme-fn (feed-format feed) "feeds"))))
19
     (write-document feed (theme-fn (feed-format feed) "feeds"))))
20
 
20
 
21
 ;;; Tag Feeds
21
 ;;; Tag Feeds
22
 
22
 
23
-(defclass tag-feed (index feed) ())
23
+(defclass tag-feed (index base-feed) ())
24
 
24
 
25
 (defmethod discover ((doc-type (eql (find-class 'tag-feed))))
25
 (defmethod discover ((doc-type (eql (find-class 'tag-feed))))
26
   (let ((content (by-date (find-all 'post))))
26
   (let ((content (by-date (find-all 'post))))