Add a title and treat static-pages as markdown.
This commit is contained in:
parent
3bf0bcf337
commit
f1abdd5410
1 changed files with 8 additions and 2 deletions
|
@ -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)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue