Add a title and treat static-pages as markdown.

This commit is contained in:
Brit Butler 2014-04-29 00:20:46 -04:00
parent 3bf0bcf337
commit f1abdd5410

View file

@ -12,10 +12,16 @@
(in-package :coleslaw-static-pages)
(defclass page (content)
((url :initarg :url :reader page-url)))
((title :initarg :title :reader page-title)
(url :initarg :url :reader page-url)))
(defmethod initialize-instance :after ((object page) &key)
;; Expect all static-pages to be written in Markdown for now.
(with-accessors ((text content-text)) object
(setf text (render-text text :md))))
(defmethod render ((object page) &key next prev)
;; For now, we'll re-use the normal post theme.
;; For the time being, we'll re-use the normal post theme.
(funcall (theme-fn 'post) (list :config *config*
:post object)))