Use some more format recipes.
This commit is contained in:
parent
975be4236e
commit
a67a08d54a
2 changed files with 3 additions and 4 deletions
|
@ -15,10 +15,9 @@
|
|||
(defgeneric discover (doc-type)
|
||||
(:documentation "Load all documents of the given DOC-TYPE into memory.")
|
||||
(:method (doc-type)
|
||||
(let* ((class-name (class-name doc-type))
|
||||
(file-type (string-downcase (symbol-name class-name))))
|
||||
(let ((file-type (format nil "~(~A~)" (class-name doc-type))))
|
||||
(do-files (file (repo *config*) file-type)
|
||||
(let ((obj (construct class-name (read-content file))))
|
||||
(let ((obj (construct (class-name doc-type) (read-content file))))
|
||||
(add-document obj))))))
|
||||
|
||||
(defmethod discover :before (doc-type)
|
||||
|
|
|
@ -29,7 +29,7 @@ any return value other than nil indicates the injection should be added."
|
|||
|
||||
(defun theme-package (name)
|
||||
"Find the package matching the theme NAME or signal THEME-DOES-NOT-EXIST."
|
||||
(or (find-package (string-upcase (concatenate 'string "coleslaw.theme." name)))
|
||||
(or (find-package (format nil "~:@(coleslaw.theme.~A~)" name))
|
||||
(error 'theme-does-not-exist :theme name)))
|
||||
|
||||
(defun theme-fn (name &optional (package (theme *config*)))
|
||||
|
|
Loading…
Add table
Reference in a new issue