Selaa lähdekoodia

Simplify TAG and INDEX definitions.

Brit Butler 11 vuotta sitten
vanhempi
commit
b2ffed2b17
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 2 2
      src/content.lisp
  2. 3 3
      src/indexes.lisp

+ 2 - 2
src/content.lisp

@@ -3,8 +3,8 @@
3 3
 ;; Tagging
4 4
 
5 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 9
 (defun make-tag (str)
10 10
   "Takes a string and returns a TAG instance with a name and slug."

+ 3 - 3
src/indexes.lisp

@@ -1,9 +1,9 @@
1 1
 (in-package :coleslaw)
2 2
 
3 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 8
 (defmethod render ((object index) &key prev next)
9 9
   (funcall (theme-fn 'index) (list :tags (all-tags)