Stick with pathnames throughout.

This commit is contained in:
Brit Butler 2012-12-14 15:04:21 -05:00
parent d7747ea0b2
commit 8463a33b62

View file

@ -15,11 +15,11 @@
(defgeneric page-path (object)
(:documentation "The path to store OBJECT at once rendered."))
(defmethod page-path :around ((object object))
(let ((result (namestring (call-next-method))))
(if (position #\. result)
(defmethod page-path :around ((object t))
(let ((result (call-next-method)))
(if (pathname-type result)
result
(concatenate 'string result ".html"))))
(make-pathname :type "html" :defaults result))))
(defun render-page (content &optional theme-fn &rest render-args)
"Render the given CONTENT to disk using THEME-FN if supplied.