Browse Source

Simplify TAG and INDEX definitions.

Brit Butler 11 years ago
parent
commit
b2ffed2b17
2 changed files with 5 additions and 5 deletions
  1. 2 2
      src/content.lisp
  2. 3 3
      src/indexes.lisp

+ 2 - 2
src/content.lisp

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

+ 3 - 3
src/indexes.lisp

1
 (in-package :coleslaw)
1
 (in-package :coleslaw)
2
 
2
 
3
 (defclass index ()
3
 (defclass index ()
4
-  ((slug :initform nil :initarg :slug :accessor index-slug)
5
-   (title :initform nil :initarg :title :accessor index-title)
6
-   (content :initform nil :initarg :content :accessor index-content)))
4
+  ((slug :initarg :slug :reader index-slug)
5
+   (title :initarg :title :reader index-title)
6
+   (content :initarg :content :reader index-content)))
7
 
7
 
8
 (defmethod render ((object index) &key prev next)
8
 (defmethod render ((object index) &key prev next)
9
   (funcall (theme-fn 'index) (list :tags (all-tags)
9
   (funcall (theme-fn 'index) (list :tags (all-tags)