Minor cleanups.
This commit is contained in:
parent
c706964880
commit
a2cd3c1cda
5 changed files with 22 additions and 19 deletions
8
TODO
8
TODO
|
@ -16,3 +16,11 @@ Coleslaw.next
|
|||
; unit tests
|
||||
; Incremental compilation: only "touched" posts+tags+months and by-n. -> 1.0
|
||||
|
||||
;; DOCUMENTATION
|
||||
;; A theme directory should be named after the theme and contain *.tmpl files
|
||||
;; that define the following functions in a coleslaw.theme.$NAME namespace.
|
||||
;; Required templates:
|
||||
;; {template base}
|
||||
;; {template post}
|
||||
;; {template index}
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
(defpackage :coleslaw-s3
|
||||
(:use :cl :zs3)
|
||||
(:import-from :coleslaw #:deploy)
|
||||
(:import-from :coleslaw #:deploy
|
||||
#:*config*)
|
||||
(:import-from :zs3 #:all-keys
|
||||
#:etag
|
||||
#:file-etag
|
||||
|
@ -48,7 +49,7 @@ and the secret key on the second.")
|
|||
(cl-fad:walk-directory dir #'upload)))
|
||||
|
||||
(defmethod deploy :after (staging)
|
||||
(let ((blog (deploy coleslaw::*config*)))
|
||||
(let ((blog (deploy *config*)))
|
||||
(loop for key across (all-keys *bucket*)
|
||||
do (setf (gethash (etag key) *cache*) key))
|
||||
(dir->s3 blog)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#:compose)
|
||||
(:import-from :closure-template #:compile-template)
|
||||
(:export #:main
|
||||
#:*config*
|
||||
#:blog
|
||||
#:content
|
||||
#:post
|
||||
|
|
|
@ -14,6 +14,7 @@ any return value other than nil indicates the injection should be added."
|
|||
(push result (getf *injections* location))))
|
||||
|
||||
(defun find-injections (content)
|
||||
"Iterate over *INJECTIONS* collecting any that should be added to CONTENT."
|
||||
(flet ((injections-for (location)
|
||||
(loop for (injection predicate) in (getf *injections* location)
|
||||
when (funcall predicate content)
|
||||
|
@ -35,11 +36,3 @@ any return value other than nil indicates the injection should be added."
|
|||
(compile-template :common-lisp-backend file))
|
||||
(do-files (file (app-path "themes/") "tmpl")
|
||||
(compile-template :common-lisp-backend file)))
|
||||
|
||||
;; DOCUMENTATION
|
||||
;; A theme directory should be named after the theme and contain *.tmpl files
|
||||
;; that define the following functions in a coleslaw.theme.$NAME namespace.
|
||||
;; Required templates:
|
||||
;; {template base}
|
||||
;; {template post}
|
||||
;; {template index}
|
||||
|
|
|
@ -29,6 +29,15 @@ on files that match the given extension."
|
|||
,@body)))
|
||||
`,body))))
|
||||
|
||||
(defun exit ()
|
||||
"Exit the lisp system returning a 0 status code."
|
||||
#+sbcl (sb-ext:quit)
|
||||
#+ccl (ccl:quit)
|
||||
#+ecl (si:quit)
|
||||
#+cmucl (ext:quit)
|
||||
#+clisp (ext:quit)
|
||||
#-(or sbcl ccl ecl cmucl clisp) (error "Not implemented yet."))
|
||||
|
||||
(defun current-directory ()
|
||||
"Return the operating system's current directory."
|
||||
#+sbcl (sb-posix:getcwd)
|
||||
|
@ -47,15 +56,6 @@ on files that match the given extension."
|
|||
#+clisp (ext:cd path)
|
||||
#-(or sbcl ccl ecl cmucl clisp) (error "Not implemented yet."))
|
||||
|
||||
(defun exit ()
|
||||
"Exit the lisp system returning a 0 status code."
|
||||
#+sbcl (sb-ext:quit)
|
||||
#+ccl (ccl:quit)
|
||||
#+ecl (si:quit)
|
||||
#+cmucl (ext:quit)
|
||||
#+clisp (ext:quit)
|
||||
#-(or sbcl ccl ecl clisp) (error "Not implemented yet."))
|
||||
|
||||
(defmacro with-current-directory (path &body body)
|
||||
"Change the current OS directory to PATH and execute BODY in
|
||||
an UNWIND-PROTECT, then change back to the current directory."
|
||||
|
|
Loading…
Add table
Reference in a new issue