Minor style tweak and flesh out tag-based feed support.

This commit is contained in:
Brit Butler 2012-09-12 14:44:44 -04:00
parent e89060dc8e
commit 971b1aa151
3 changed files with 13 additions and 13 deletions

View file

@ -22,4 +22,6 @@
(render-page (make-instance 'index :path "rss.xml" :posts posts) :rss)
(render-page (make-instance 'index :path "feed.atom" :posts posts) :atom)
(dolist (feed feeds)
(render-page feed :rss))))
(let ((index (index-by-tag feed by-tag)))
(setf (index-path index) (format nil "tag/~a-rss.xml" feed))
(render-page index :rss)))))

View file

@ -6,13 +6,12 @@
(title :initform nil :initarg :title :accessor index-title)))
(defmethod render ((content index) &key prev next)
(funcall (theme-fn 'index)
(list :tags (all-tags)
:months (all-months)
:config *config*
:index content
:prev prev
:next next)))
(funcall (theme-fn 'index) (list :tags (all-tags)
:months (all-months)
:config *config*
:index content
:prev prev
:next next)))
(defun all-months ()
"Retrieve a list of all months with published posts."

View file

@ -12,11 +12,10 @@
(content :initform nil :initarg :content :accessor post-content)))
(defmethod render ((content post) &key prev next)
(funcall (theme-fn 'post)
(list :config *config*
:post content
:prev prev
:next next)))
(funcall (theme-fn 'post) (list :config *config*
:post content
:prev prev
:next next)))
(defun load-posts ()
"Read the stored .post files from the repo."