Bugfix: Feed should be an abstract class.

This commit is contained in:
Brit Butler 2014-07-02 16:22:04 -04:00
parent 0dae5d249a
commit a176f38537
2 changed files with 7 additions and 5 deletions

View file

@ -1,7 +1,7 @@
(defsystem #:coleslaw
:name "coleslaw"
:description "Flexible Lisp Blogware"
:version "0.9.5"
:version "0.9.5-dev"
:license "BSD"
:author "Brit Butler <redline6561@gmail.com>"
:pathname "src/"

View file

@ -5,16 +5,18 @@
(defclass feed (index)
((format :initform nil :initarg :format :accessor feed-format)))
(defmethod discover ((doc-type (eql (find-class 'feed))))
(defclass standard-feed (feed) ())
(defmethod discover ((doc-type (eql (find-class 'standard-feed))))
(let ((content (by-date (find-all 'post))))
(dolist (format '(rss atom))
(let ((feed (make-instance 'feed :format format
(let ((feed (make-instance 'standard-feed :format format
:content (take-up-to 10 content)
:slug (format nil "~(~a~)" format))))
(add-document feed)))))
(defmethod publish ((doc-type (eql (find-class 'feed))))
(dolist (feed (find-all 'feed))
(defmethod publish ((doc-type (eql (find-class 'standard-feed))))
(dolist (feed (find-all 'standard-feed))
(write-document feed (theme-fn (feed-format feed) "feeds"))))
;;; Tag Feeds