finished adding github's pages support
This commit is contained in:
parent
6396e136d3
commit
bf6ba24434
3 changed files with 9 additions and 6 deletions
|
@ -13,7 +13,8 @@
|
|||
:inferior-shell
|
||||
:cl-fad
|
||||
:cl-ppcre
|
||||
:closer-mop)
|
||||
:closer-mop
|
||||
:puri)
|
||||
:serial t
|
||||
:components ((:file "packages")
|
||||
(:file "util")
|
||||
|
|
|
@ -51,7 +51,7 @@ Additional args to render CONTENT can be passed via RENDER-ARGS."
|
|||
(when (probe-file dir)
|
||||
(run-program "cp -R ~a ." dir)))
|
||||
(do-ctypes (publish ctype))
|
||||
(render-indices)
|
||||
(render-indices (not (github *config*)))
|
||||
(render-feeds (feeds *config*))))
|
||||
|
||||
(defgeneric deploy (staging)
|
||||
|
@ -65,8 +65,8 @@ Additional args to render CONTENT can be passed via RENDER-ARGS."
|
|||
(run-program "mv ~a ~a" staging new-build)
|
||||
(when (github *config*)
|
||||
(let ((cname-filename (rel-path "" "~a/CNAME" new-build))
|
||||
(stripped-url (subseq (domain *config*)
|
||||
(+ 2 (position #\/ (domain *config*))))))
|
||||
(stripped-url (puri:uri-host (puri:parse-uri
|
||||
(domain *config*)))))
|
||||
(format t "~a" cname-filename)
|
||||
(with-open-file (cname cname-filename
|
||||
:direction :output
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
:posts (subseq content start end)
|
||||
:title "Recent Posts")))
|
||||
|
||||
(defun render-indices ()
|
||||
(defun render-indices (make-symlink-p)
|
||||
"Render the indices to view content in groups of size N, by month, and by tag."
|
||||
(let ((results (by-date (hash-table-values *content*))))
|
||||
(dolist (tag (all-tags))
|
||||
|
@ -83,4 +83,6 @@
|
|||
:prev (and (plusp i) i)
|
||||
:next (and (< (* (1+ i) 10) (length results))
|
||||
(+ 2 i)))))))
|
||||
(update-symlink "index.html" "1.html"))
|
||||
(if make-symlink
|
||||
(update-symlink "index.html" "1.html")
|
||||
(run-program "cp 1.html index.html")))
|
||||
|
|
Loading…
Add table
Reference in a new issue