Browse Source

Remove page-url methods now stored in the config.

We probably don't want to merge this in until users have had an
adjustment period or without putting a *big* warning in the NEWS.
Users will need to know to update their configs/steal the :routing
block from the example config.
Brit Butler 11 years ago
parent
commit
514761e1cd
2 changed files with 0 additions and 18 deletions
  1. 0 15
      src/indexes.lisp
  2. 0 3
      src/posts.lisp

+ 0 - 15
src/indexes.lisp

17
 
17
 
18
 (defclass tag-index (index) ())
18
 (defclass tag-index (index) ())
19
 
19
 
20
-(defmethod page-url ((object tag-index))
21
-  (format nil "tag/~a" (index-slug object)))
22
-
23
 (defmethod discover ((doc-type (eql (find-class 'tag-index))))
20
 (defmethod discover ((doc-type (eql (find-class 'tag-index))))
24
   (let ((content (by-date (find-all 'post))))
21
   (let ((content (by-date (find-all 'post))))
25
     (dolist (tag (all-tags))
22
     (dolist (tag (all-tags))
39
 
36
 
40
 (defclass month-index (index) ())
37
 (defclass month-index (index) ())
41
 
38
 
42
-(defmethod page-url ((object month-index))
43
-  (format nil "date/~a" (index-slug object)))
44
-
45
 (defmethod discover ((doc-type (eql (find-class 'month-index))))
39
 (defmethod discover ((doc-type (eql (find-class 'month-index))))
46
   (let ((content (by-date (find-all 'post))))
40
   (let ((content (by-date (find-all 'post))))
47
     (dolist (month (all-months))
41
     (dolist (month (all-months))
61
 
55
 
62
 (defclass numeric-index (index) ())
56
 (defclass numeric-index (index) ())
63
 
57
 
64
-(defmethod page-url ((object numeric-index))
65
-  (format nil "~d" (index-slug object)))
66
-
67
 (defmethod discover ((doc-type (eql (find-class 'numeric-index))))
58
 (defmethod discover ((doc-type (eql (find-class 'numeric-index))))
68
   (let ((content (by-date (find-all 'post))))
59
   (let ((content (by-date (find-all 'post))))
69
     (dotimes (i (ceiling (length content) 10))
60
     (dotimes (i (ceiling (length content) 10))
90
 (defclass feed (index)
81
 (defclass feed (index)
91
   ((format :initform nil :initarg :format :accessor feed-format)))
82
   ((format :initform nil :initarg :format :accessor feed-format)))
92
 
83
 
93
-(defmethod page-url ((object feed))
94
-  (format nil "~a.xml" (index-slug object)))
95
-
96
 (defmethod discover ((doc-type (eql (find-class 'feed))))
84
 (defmethod discover ((doc-type (eql (find-class 'feed))))
97
   (let ((content (by-date (find-all 'post))))
85
   (let ((content (by-date (find-all 'post))))
98
     (dolist (format '(rss atom))
86
     (dolist (format '(rss atom))
109
 
97
 
110
 (defclass tag-feed (feed) ())
98
 (defclass tag-feed (feed) ())
111
 
99
 
112
-(defmethod page-url ((object tag-feed))
113
-  (format nil "tag/~a.xml" (index-slug object)))
114
-
115
 (defmethod discover ((doc-type (eql (find-class 'tag-feed))))
100
 (defmethod discover ((doc-type (eql (find-class 'tag-feed))))
116
   (let ((content (by-date (find-all 'post))))
101
   (let ((content (by-date (find-all 'post))))
117
     (dolist (tag (feeds *config*))
102
     (dolist (tag (feeds *config*))

+ 0 - 3
src/posts.lisp

21
                                   :prev prev
21
                                   :prev prev
22
                                   :next next)))
22
                                   :next next)))
23
 
23
 
24
-(defmethod page-url ((object post))
25
-  (format nil "posts/~a" (content-slug object)))
26
-
27
 (defmethod publish ((doc-type (eql (find-class 'post))))
24
 (defmethod publish ((doc-type (eql (find-class 'post))))
28
   (loop for (next post prev) on (append '(nil) (by-date (find-all 'post)))
25
   (loop for (next post prev) on (append '(nil) (by-date (find-all 'post)))
29
      while post do (write-document post nil :prev prev :next next)))
26
      while post do (write-document post nil :prev prev :next next)))