瀏覽代碼

Export *config* and use it in heroku plugin.

Brit Butler 12 年之前
父節點
當前提交
e893ac5447
共有 2 個文件被更改,包括 8 次插入5 次删除
  1. 7 5
      plugins/heroku.lisp
  2. 1 0
      src/packages.lisp

+ 7 - 5
plugins/heroku.lisp

@@ -6,15 +6,17 @@
6 6
   (:import-from #:hunchentoot :create-folder-dispatcher-and-handler
7 7
                               :create-static-file-dispatcher-and-handler
8 8
                               :*dispatch-table*)
9
-  (:import-from #:coleslaw :deploy)
9
+  (:import-from #:coleslaw :deploy
10
+                           :*config*)
10 11
   (:export #:enable))
11 12
 
12 13
 (in-package :coleslaw-heroku)
13 14
 
14 15
 (defmethod deploy :after (staging)
15
-  (push (create-folder-dispatcher-and-handler "/" "/app/.curr/")
16
-        *dispatch-table*)
17
-  (push (create-static-file-dispatcher-and-handler "/" "/app/.curr/index.html")
18
-        *dispatch-table*))
16
+  (let ((blog (merge-pathnames ".curr/" (deploy *config*))))
17
+    (push (create-folder-dispatcher-and-handler "/" blog)
18
+          *dispatch-table*)
19
+    (push (create-static-file-dispatcher-and-handler "/" (merge-pathnames "index.html" blog))
20
+          *dispatch-table*)))
19 21
 
20 22
 (defun enable ())

+ 1 - 0
src/packages.lisp

@@ -7,6 +7,7 @@
7 7
                             #:compose)
8 8
   (:import-from :closure-template #:compile-template)
9 9
   (:export #:main
10
+           #:*config*
10 11
            #:blog
11 12
            #:content
12 13
            #:post