Compilation works. Now to fix the deploy...
This commit is contained in:
parent
e60c9f0d6c
commit
8787fa0f21
4 changed files with 9 additions and 9 deletions
5
TODO
5
TODO
|
@ -13,13 +13,10 @@ Plugins? Injection support for HEAD and BODY. What about predicate-based injecti
|
||||||
How is it served? Hunchentoot, Lighttpd, S3, whomever!
|
How is it served? Hunchentoot, Lighttpd, S3, whomever!
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
; blockers to use this for redlinernotes: rss/atom feed, markdown support
|
; blockers to use this for redlinernotes: prev/next, rss/atom feed, markdown support
|
||||||
; after that, focus on injections for code highlighting and latex
|
; after that, focus on injections for code highlighting and latex
|
||||||
|
|
||||||
; doc themes and plugins
|
; doc themes and plugins
|
||||||
; populate prev and next links
|
|
||||||
; implement plugins: atom, markdown, pygment/highlighting
|
|
||||||
; actually start using this for redlinernotes.com? Move over May-2007 to present.
|
|
||||||
; fix plugins: s3
|
; fix plugins: s3
|
||||||
;; Incremental compile: only "touched" posts+tags+months. By-20 must be redone, of course.
|
;; Incremental compile: only "touched" posts+tags+months. By-20 must be redone, of course.
|
||||||
;; ^^ Long as we're overhauling, maybe come up with a commithook scheme that runs main
|
;; ^^ Long as we're overhauling, maybe come up with a commithook scheme that runs main
|
||||||
|
|
|
@ -5,10 +5,14 @@
|
||||||
If ARGS is provided, use (apply 'format nil PATH ARGS) as the value of PATH."
|
If ARGS is provided, use (apply 'format nil PATH ARGS) as the value of PATH."
|
||||||
(merge-pathnames (apply 'format nil path args) coleslaw-conf:*basedir*))
|
(merge-pathnames (apply 'format nil path args) coleslaw-conf:*basedir*))
|
||||||
|
|
||||||
(defun to-pathname (file parent)
|
(defun to-pathname (file &optional (parent coleslaw-conf:*basedir*))
|
||||||
"Convert an iolib file-path back to a pathname."
|
"Convert an iolib file-path back to a pathname."
|
||||||
(merge-pathnames (file-path-namestring file) parent))
|
(merge-pathnames (file-path-namestring file) parent))
|
||||||
|
|
||||||
|
(defun read-symlink (path)
|
||||||
|
"A trivial wrapper over iolib.os that returns the pathname in the symlink PATH."
|
||||||
|
(to-pathname (iolib.os:read-symlink path)))
|
||||||
|
|
||||||
(defmacro do-files ((var path &optional extension) &body body)
|
(defmacro do-files ((var path &optional extension) &body body)
|
||||||
"For each file under PATH, run BODY. If EXTENSION is provided, only run BODY
|
"For each file under PATH, run BODY. If EXTENSION is provided, only run BODY
|
||||||
on files that match the given extension."
|
on files that match the given extension."
|
||||||
|
@ -67,7 +71,7 @@ on files that match the given extension."
|
||||||
(:documentation "Deploy DIR, updating the .prev and .curr symlinks.")
|
(:documentation "Deploy DIR, updating the .prev and .curr symlinks.")
|
||||||
(:method (dir)
|
(:method (dir)
|
||||||
(let ((new-build (app-path "generated/~a" (get-universal-time))))
|
(let ((new-build (app-path "generated/~a" (get-universal-time))))
|
||||||
(run-program "mv" (list dir (namestring new-build)))
|
(run-program "mv" (mapcar #'namestring (list dir new-build)))
|
||||||
(when (probe-file (app-path ".prev"))
|
(when (probe-file (app-path ".prev"))
|
||||||
(delete-directory-and-files (read-symlink (app-path ".prev"))))
|
(delete-directory-and-files (read-symlink (app-path ".prev"))))
|
||||||
(when (probe-file (app-path ".curr"))
|
(when (probe-file (app-path ".curr"))
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
"Render the indices to view posts by tag."
|
"Render the indices to view posts by tag."
|
||||||
(loop for tag in (all-tags)
|
(loop for tag in (all-tags)
|
||||||
do (flet ((match-tag (post)
|
do (flet ((match-tag (post)
|
||||||
(member tag post :test #'string= :key #'post-tags)))
|
(member tag (post-tags post) :test #'string=)))
|
||||||
(let ((posts (remove-if-not #'match-tag posts)))
|
(let ((posts (remove-if-not #'match-tag (hash-table-values *posts*))))
|
||||||
(write-index posts (format nil "tag/~a.html" tag)
|
(write-index posts (format nil "tag/~a.html" tag)
|
||||||
(format nil "Posts tagged ~a" tag))))))
|
(format nil "Posts tagged ~a" tag))))))
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
(:import-from :cl-fad #:delete-directory-and-files
|
(:import-from :cl-fad #:delete-directory-and-files
|
||||||
#:list-directory)
|
#:list-directory)
|
||||||
(:import-from :iolib.os #:with-current-directory
|
(:import-from :iolib.os #:with-current-directory
|
||||||
#:read-symlink
|
|
||||||
#:run-program)
|
#:run-program)
|
||||||
(:import-from :iolib.pathnames #:file-path-namestring)
|
(:import-from :iolib.pathnames #:file-path-namestring)
|
||||||
(:import-from :alexandria #:hash-table-values
|
(:import-from :alexandria #:hash-table-values
|
||||||
|
|
Loading…
Add table
Reference in a new issue