diff --git a/src/documents.lisp b/src/documents.lisp index dd6c789..ac809df 100644 --- a/src/documents.lisp +++ b/src/documents.lisp @@ -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) diff --git a/src/themes.lisp b/src/themes.lisp index c042d8e..1d7947c 100644 --- a/src/themes.lisp +++ b/src/themes.lisp @@ -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*)))