Fix feed handling bug backwards compatibly. No name changes.
This commit is contained in:
parent
1289706b46
commit
1b3acd107e
2 changed files with 8 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
||||||
(:tag-index "tag/~a")
|
(:tag-index "tag/~a")
|
||||||
(:month-index "date/~a")
|
(:month-index "date/~a")
|
||||||
(:numeric-index "~d")
|
(:numeric-index "~d")
|
||||||
(:standard-feed "~a.xml")
|
(:feed "~a.xml")
|
||||||
(:tag-feed "tag/~a.xml"))
|
(:tag-feed "tag/~a.xml"))
|
||||||
:sitenav ((:url "http://redlinernotes.com/" :name "Home")
|
:sitenav ((:url "http://redlinernotes.com/" :name "Home")
|
||||||
(:url "http://twitter.com/redline6561" :name "Twitter")
|
(:url "http://twitter.com/redline6561" :name "Twitter")
|
||||||
|
|
|
@ -2,25 +2,25 @@
|
||||||
|
|
||||||
;;; Atom and RSS Feeds
|
;;; Atom and RSS Feeds
|
||||||
|
|
||||||
(defclass feed () ((format :initarg :format :reader feed-format)))
|
(defclass base-feed () ((format :initarg :format :reader feed-format)))
|
||||||
|
|
||||||
(defclass standard-feed (index feed) ())
|
(defclass feed (index base-feed) ())
|
||||||
|
|
||||||
(defmethod discover ((doc-type (eql (find-class 'standard-feed))))
|
(defmethod discover ((doc-type (eql (find-class 'feed))))
|
||||||
(let ((content (by-date (find-all 'post))))
|
(let ((content (by-date (find-all 'post))))
|
||||||
(dolist (format '(rss atom))
|
(dolist (format '(rss atom))
|
||||||
(let ((feed (make-instance 'standard-feed :format format
|
(let ((feed (make-instance 'feed :format format
|
||||||
:content (take-up-to 10 content)
|
:content (take-up-to 10 content)
|
||||||
:slug (format nil "~(~a~)" format))))
|
:slug (format nil "~(~a~)" format))))
|
||||||
(add-document feed)))))
|
(add-document feed)))))
|
||||||
|
|
||||||
(defmethod publish ((doc-type (eql (find-class 'standard-feed))))
|
(defmethod publish ((doc-type (eql (find-class 'feed))))
|
||||||
(dolist (feed (find-all 'standard-feed))
|
(dolist (feed (find-all 'feed))
|
||||||
(write-document feed (theme-fn (feed-format feed) "feeds"))))
|
(write-document feed (theme-fn (feed-format feed) "feeds"))))
|
||||||
|
|
||||||
;;; Tag Feeds
|
;;; Tag Feeds
|
||||||
|
|
||||||
(defclass tag-feed (index feed) ())
|
(defclass tag-feed (index base-feed) ())
|
||||||
|
|
||||||
(defmethod discover ((doc-type (eql (find-class 'tag-feed))))
|
(defmethod discover ((doc-type (eql (find-class 'tag-feed))))
|
||||||
(let ((content (by-date (find-all 'post))))
|
(let ((content (by-date (find-all 'post))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue