diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index f09121e..f59321a 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -57,6 +57,6 @@ Additional args to render CONTENT can be passed via RENDER-ARGS." (defun main () "Load the user's config, then compile and deploy the blog." (load-config) - (compile-theme) + (compile-theme (theme *config*)) (compile-blog (staging *config*)) (deploy (staging *config*))) diff --git a/src/themes.lisp b/src/themes.lisp index c48d671..8208b19 100644 --- a/src/themes.lisp +++ b/src/themes.lisp @@ -16,15 +16,18 @@ "Find the symbol NAME inside the current theme's package." (find-symbol (princ-to-string name) (theme-package))) -(defun compile-theme (&key (theme-dir (app-path "themes/~a/" (theme *config*)))) - "Iterate over the files in THEME-DIR, compiling them when they are templates." - (do-files (file theme-dir "tmpl") +(defun compile-theme (theme) + "Locate and compile the templates for the given THEME." + (do-files (file (app-path "themes/~a/" theme) "tmpl") + (compile-template :common-lisp-backend file)) + (do-files (file (app-path "themes/") "tmpl") (compile-template :common-lisp-backend file))) ;; DOCUMENTATION ;; A theme directory should be named after the theme and contain *.tmpl files ;; that define the following functions in a coleslaw.theme.$NAME namespace. -;; Required templates follow with suggested args (args will be in plists): -;; {template base} // title navigation siteroot content credits &key license headInject bodyInject -;; {template post} // title tags date content prev next &key comments -;; {template index} // title posts prev next &key taglinks monthlinks count +;; Required templates: +;; {template base} +;; {template post} +;; {template index} + diff --git a/themes/hyde/atom.tmpl b/themes/atom.tmpl similarity index 100% rename from themes/hyde/atom.tmpl rename to themes/atom.tmpl diff --git a/themes/hyde/rss.tmpl b/themes/rss.tmpl similarity index 100% rename from themes/hyde/rss.tmpl rename to themes/rss.tmpl