Recently Written · git

coleslaw

Emacs mode for the "Coleslaw" site generator written in Common Lisp.

git clone https://github.com/equwal/coleslaw

Log | Files | Refs


commit 21411d37d9b40f48e59aa55d26c1621aa5ff9de2
Masataro Asai <guicho2.71828@gmail.com>
2019-10-27 17:04:55 -0400

reinitialize gh-pages

 plugins/gh-pages.lisp | 27 ---------------------------
 1 file changed, 27 deletions(-)
diff --git a/plugins/gh-pages.lisp b/plugins/gh-pages.lisp
index 794561d..4c61ffd 100644
--- a/plugins/gh-pages.lisp
+++ b/plugins/gh-pages.lisp
@@ -1,33 +1,6 @@
-(eval-when (:compile-toplevel :load-toplevel)
-  (ql:quickload 'puri))
-
 (defpackage :coleslaw-gh-pages
   (:use :cl)
-  (:import-from :puri #:parse-uri #:uri-host)
-  (:import-from :coleslaw #:*config*
-                          #:deploy
-                          #:deploy-dir
-                          #:domain
-                          #:rel-path)
   (:export #:enable))
 
 (in-package :coleslaw-gh-pages)
 
-(defvar *cname* nil
-  "The domain CNAME for github to serve pages from.")
-
-(defmethod deploy :after (staging)
-  (let ((blog (rel-path (deploy-dir *config*) ".curr")))
-    (delete-file (rel-path blog "index.html"))
-    (cl-fad:copy-file (rel-path blog "1.html") (rel-path blog "index.html"))
-    (with-open-file (out (rel-path blog "CNAME")
-                     :direction :output
-                     :if-exists :supersede
-                     :if-does-not-exist :create)
-      (format out "~A~%" *cname*))))
-
-(defun enable (&key cname)
-  (typecase cname
-    (string (setf *cname* cname))
-    (t (setf *cname* (uri-host (parse-uri (domain *config*)))))
-    (otherwise (error "Not a valid CNAME: ~A" cname))))