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 "rss.xml" :posts posts) :rss)
(render-page (make-instance 'index :path "feed.atom" :posts posts) :atom) (render-page (make-instance 'index :path "feed.atom" :posts posts) :atom)
(dolist (feed feeds) (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))) (title :initform nil :initarg :title :accessor index-title)))
(defmethod render ((content index) &key prev next) (defmethod render ((content index) &key prev next)
(funcall (theme-fn 'index) (funcall (theme-fn 'index) (list :tags (all-tags)
(list :tags (all-tags) :months (all-months)
:months (all-months) :config *config*
:config *config* :index content
:index content :prev prev
:prev prev :next next)))
:next next)))
(defun all-months () (defun all-months ()
"Retrieve a list of all months with published posts." "Retrieve a list of all months with published posts."

View file

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