Parcourir la 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 il y a 11 ans
Parent
commit
514761e1cd
2 fichiers modifiés avec 0 ajouts et 18 suppressions
  1. 0 15
      src/indexes.lisp
  2. 0 3
      src/posts.lisp

+ 0 - 15
src/indexes.lisp

@@ -17,9 +17,6 @@
17 17
 
18 18
 (defclass tag-index (index) ())
19 19
 
20
-(defmethod page-url ((object tag-index))
21
-  (format nil "tag/~a" (index-slug object)))
22
-
23 20
 (defmethod discover ((doc-type (eql (find-class 'tag-index))))
24 21
   (let ((content (by-date (find-all 'post))))
25 22
     (dolist (tag (all-tags))
@@ -39,9 +36,6 @@
39 36
 
40 37
 (defclass month-index (index) ())
41 38
 
42
-(defmethod page-url ((object month-index))
43
-  (format nil "date/~a" (index-slug object)))
44
-
45 39
 (defmethod discover ((doc-type (eql (find-class 'month-index))))
46 40
   (let ((content (by-date (find-all 'post))))
47 41
     (dolist (month (all-months))
@@ -61,9 +55,6 @@
61 55
 
62 56
 (defclass numeric-index (index) ())
63 57
 
64
-(defmethod page-url ((object numeric-index))
65
-  (format nil "~d" (index-slug object)))
66
-
67 58
 (defmethod discover ((doc-type (eql (find-class 'numeric-index))))
68 59
   (let ((content (by-date (find-all 'post))))
69 60
     (dotimes (i (ceiling (length content) 10))
@@ -90,9 +81,6 @@
90 81
 (defclass feed (index)
91 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 84
 (defmethod discover ((doc-type (eql (find-class 'feed))))
97 85
   (let ((content (by-date (find-all 'post))))
98 86
     (dolist (format '(rss atom))
@@ -109,9 +97,6 @@
109 97
 
110 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 100
 (defmethod discover ((doc-type (eql (find-class 'tag-feed))))
116 101
   (let ((content (by-date (find-all 'post))))
117 102
     (dolist (tag (feeds *config*))

+ 0 - 3
src/posts.lisp

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