Simplify plugin loader.
This commit is contained in:
parent
40a61d0615
commit
60ad551523
4 changed files with 6 additions and 7 deletions
1
NEWS.md
1
NEWS.md
|
@ -1,5 +1,6 @@
|
||||||
## Changes for 0.9 (2013-xx-xx):
|
## 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 analytics via Google.
|
||||||
* Add support for Restructured Text via cl-docutils.
|
* Add support for Restructured Text via cl-docutils.
|
||||||
* Add support for deploying to Amazon S3.
|
* Add support for deploying to Amazon S3.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
:deploy "/home/coleslaw/www/lisp-is-fun/"
|
:deploy "/home/coleslaw/www/lisp-is-fun/"
|
||||||
:domain "http://blub.co.za"
|
:domain "http://blub.co.za"
|
||||||
:feeds ("lisp")
|
:feeds ("lisp")
|
||||||
:plugins (mathjax)
|
:plugins ((mathjax))
|
||||||
:sitenav ((:url "http://twitter.com/ralph_moeritz" :name "Twitter")
|
:sitenav ((:url "http://twitter.com/ralph_moeritz" :name "Twitter")
|
||||||
(:url "http://github.com/ralph-moeritz" :name "Code"))
|
(:url "http://github.com/ralph-moeritz" :name "Code"))
|
||||||
:title "(lisp :is 'fun)"
|
:title "(lisp :is 'fun)"
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
:deploy "/home/coleslaw/www/musings/"
|
:deploy "/home/coleslaw/www/musings/"
|
||||||
:domain "http://musings.co.za"
|
:domain "http://musings.co.za"
|
||||||
:feeds ("opinion")
|
:feeds ("opinion")
|
||||||
:plugins (mathjax)
|
:plugins ((mathjax))
|
||||||
:sitenav ((:url "http://twitter.com/ralph_moeritz" :name "Twitter")
|
:sitenav ((:url "http://twitter.com/ralph_moeritz" :name "Twitter")
|
||||||
(:url "http://github.com/ralph-moeritz" :name "Code"))
|
(:url "http://github.com/ralph-moeritz" :name "Code"))
|
||||||
:title "Musings"
|
:title "Musings"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
:deploy "/home/git/blog/"
|
:deploy "/home/git/blog/"
|
||||||
:domain "http://blog.redlinernotes.com"
|
:domain "http://blog.redlinernotes.com"
|
||||||
:feeds ("lisp")
|
:feeds ("lisp")
|
||||||
:plugins (mathjax
|
:plugins ((mathjax)
|
||||||
(disqus :shortname "my-site-name")
|
(disqus :shortname "my-site-name")
|
||||||
(analytics :tracking-code "foo"))
|
(analytics :tracking-code "foo"))
|
||||||
:repo "/home/git/tmp/improvedmeans/"
|
:repo "/home/git/tmp/improvedmeans/"
|
||||||
|
|
|
@ -33,10 +33,8 @@ are in the plugins folder in coleslaw's source directory."
|
||||||
(flet ((plugin-path (sym)
|
(flet ((plugin-path (sym)
|
||||||
(app-path "plugins/~a" (string-downcase (symbol-name sym)))))
|
(app-path "plugins/~a" (string-downcase (symbol-name sym)))))
|
||||||
(dolist (plugin plugins)
|
(dolist (plugin plugins)
|
||||||
(etypecase plugin
|
(destructuring-bind (name &rest args) plugin
|
||||||
(list (destructuring-bind (name &rest args) plugin
|
(apply 'enable-plugin (plugin-path name) args)))))
|
||||||
(apply 'enable-plugin (plugin-path name) args)))
|
|
||||||
(symbol (enable-plugin (plugin-path plugin)))))))
|
|
||||||
|
|
||||||
(defun load-config (config-key &optional (dir (user-homedir-pathname)))
|
(defun load-config (config-key &optional (dir (user-homedir-pathname)))
|
||||||
"Load the coleslaw configuration for CONFIG-KEY from DIR/.coleslawrc. DIR is ~ by default."
|
"Load the coleslaw configuration for CONFIG-KEY from DIR/.coleslawrc. DIR is ~ by default."
|
||||||
|
|
Loading…
Add table
Reference in a new issue