Simplify TAG and INDEX definitions.

This commit is contained in:
Brit Butler 2014-05-07 22:31:06 -04:00
parent 7912037f2e
commit b2ffed2b17
2 changed files with 5 additions and 5 deletions

View file

@ -3,8 +3,8 @@
;; Tagging
(defclass tag ()
((name :initform nil :initarg :name :accessor tag-name)
(slug :initform nil :Initarg :slug :accessor tag-slug)))
((name :initarg :name :reader tag-name)
(slug :initarg :slug :reader tag-slug)))
(defun make-tag (str)
"Takes a string and returns a TAG instance with a name and slug."

View file

@ -1,9 +1,9 @@
(in-package :coleslaw)
(defclass index ()
((slug :initform nil :initarg :slug :accessor index-slug)
(title :initform nil :initarg :title :accessor index-title)
(content :initform nil :initarg :content :accessor index-content)))
((slug :initarg :slug :reader index-slug)
(title :initarg :title :reader index-title)
(content :initarg :content :reader index-content)))
(defmethod render ((object index) &key prev next)
(funcall (theme-fn 'index) (list :tags (all-tags)