Simplify plugin loader.

This commit is contained in:
Brit Butler 2013-02-19 19:14:14 -05:00
parent 40a61d0615
commit 60ad551523
4 changed files with 6 additions and 7 deletions

View file

@ -1,5 +1,6 @@
## Changes for 0.9 (2013-xx-xx):
* INCOMPATIBLE CHANGE: All :plugins in .coleslawrc must be lists. (i.e. (mathjax) not mathjax)
* Add support for analytics via Google.
* Add support for Restructured Text via cl-docutils.
* Add support for deploying to Amazon S3.

View file

@ -2,7 +2,7 @@
:deploy "/home/coleslaw/www/lisp-is-fun/"
:domain "http://blub.co.za"
:feeds ("lisp")
:plugins (mathjax)
:plugins ((mathjax))
:sitenav ((:url "http://twitter.com/ralph_moeritz" :name "Twitter")
(:url "http://github.com/ralph-moeritz" :name "Code"))
:title "(lisp :is 'fun)"
@ -11,7 +11,7 @@
:deploy "/home/coleslaw/www/musings/"
:domain "http://musings.co.za"
:feeds ("opinion")
:plugins (mathjax)
:plugins ((mathjax))
:sitenav ((:url "http://twitter.com/ralph_moeritz" :name "Twitter")
(:url "http://github.com/ralph-moeritz" :name "Code"))
:title "Musings"

View file

@ -2,7 +2,7 @@
:deploy "/home/git/blog/"
:domain "http://blog.redlinernotes.com"
:feeds ("lisp")
:plugins (mathjax
:plugins ((mathjax)
(disqus :shortname "my-site-name")
(analytics :tracking-code "foo"))
:repo "/home/git/tmp/improvedmeans/"

View file

@ -33,10 +33,8 @@ are in the plugins folder in coleslaw's source directory."
(flet ((plugin-path (sym)
(app-path "plugins/~a" (string-downcase (symbol-name sym)))))
(dolist (plugin plugins)
(etypecase plugin
(list (destructuring-bind (name &rest args) plugin
(apply 'enable-plugin (plugin-path name) args)))
(symbol (enable-plugin (plugin-path plugin)))))))
(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."