Minor cleanups to MAIN and LOAD-CONFIG.

This commit is contained in:
Brit Butler 2013-04-28 15:09:38 -04:00
parent 4e7a0d4c90
commit 361316f7b3
2 changed files with 5 additions and 5 deletions

View file

@ -73,9 +73,8 @@ Additional args to render CONTENT can be passed via RENDER-ARGS."
(update-symlink prev (truename curr)))
(update-symlink curr new-build))))
(defun main (config-key)
"Load the user's config section corresponding to CONFIG-KEY, then
compile and deploy the blog."
(defun main (&optional config-key)
"Load the user's config file, then compile and deploy the blog."
(load-config config-key)
(load-content)
(compile-theme (theme *config*))

View file

@ -37,8 +37,9 @@ are in the plugins folder in coleslaw's source directory."
(destructuring-bind (name &rest args) plugin
(apply 'enable-plugin (plugin-path name) args)))))
(defun load-config (config-key &optional (dir (user-homedir-pathname)))
"Load the coleslaw configuration for CONFIG-KEY from DIR/.coleslawrc. DIR is ~ by default."
(defun load-config (&optional config-key (dir (user-homedir-pathname)))
"Load the coleslaw configuration from DIR/.coleslawrc, using CONFIG-KEY
if necessary. DIR is ~ by default."
(with-open-file (in (merge-pathnames ".coleslawrc" dir))
(let ((config-form (read in)))
(if (symbolp (car config-form))