Merge pull request #101 from ljanyst/user-plugins

Allow plug-ins to be defined in the user repo
This commit is contained in:
Brit Butler 2015-12-03 12:55:29 -05:00
commit 9819c279bb
2 changed files with 11 additions and 1 deletions

View file

@ -49,7 +49,9 @@
(defun enable-plugin (name args) (defun enable-plugin (name args)
"Given a plugin, NAME, compile+load it and call its ENABLE function with ARGS." "Given a plugin, NAME, compile+load it and call its ENABLE function with ARGS."
(flet ((plugin-path (sym) (flet ((plugin-path (sym)
(app-path "plugins/~(~A~)" sym)) (if (probe-file (repo-path "plugins/~(~A~).lisp" sym))
(repo-path "plugins/~(~A~)" sym)
(app-path "plugins/~(~A~)" sym)))
(plugin-package (sym) (plugin-package (sym)
(format nil "~:@(coleslaw-~A~)" sym))) (format nil "~:@(coleslaw-~A~)" sym)))
(let ((file (plugin-path name))) (let ((file (plugin-path name)))

View file

@ -13,6 +13,14 @@
(:export #:main (:export #:main
#:preview #:preview
#:*config* #:*config*
;; Config Accessors
#:author
#:deploy-dir
#:domain
#:page-ext
#:repo-dir
#:staging-dir
#:title
;; Core Classes ;; Core Classes
#:content #:content
#:post #:post