From 55613d717f0bfc28755865aa7e48649981db5c1c Mon Sep 17 00:00:00 2001 From: Do Nhat Minh Date: Sun, 21 Apr 2013 21:19:39 +0800 Subject: [PATCH] change slot github to github-pages, add github-pages to single-site.coleslawrc --- README.md | 1 + examples/single-site.coleslawrc | 1 + src/coleslaw.lisp | 4 ++-- src/config.lisp | 2 +- src/indices.lisp | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6fe3285..5946441 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Coleslaw aims to be flexible blog software suitable for replacing a single-user * Markdown Support with Code Highlighting provided by [colorize](http://www.cliki.net/colorize). * Currently supports: Common Lisp, Emacs Lisp, Scheme, C, C++, Java, Python, Erlang, Haskell, Obj-C, Diff. * [Multi-site publishing](http://blub.co.za/posts/Adding-multi-site-support-to-Coleslaw.html) support. +* Github's pages support * A [Plugin API](http://github.com/redline6561/coleslaw/blob/master/docs/plugin-api.md) and [plugins](http://github.com/redline6561/coleslaw/blob/master/docs/plugin-use.md) for... * Comments via Disqus diff --git a/examples/single-site.coleslawrc b/examples/single-site.coleslawrc index f0b174e..1d6174e 100644 --- a/examples/single-site.coleslawrc +++ b/examples/single-site.coleslawrc @@ -1,6 +1,7 @@ (:author "Brit Butler" :deploy "/home/git/blog/" :domain "http://blog.redlinernotes.com" + :github-pages nil :feeds ("lisp") :plugins ((mathjax) (disqus :shortname "my-site-name") diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index f59a202..6e403ec 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -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 (not (github *config*))) + (render-indices (not (github-pages *config*))) (render-feeds (feeds *config*)))) (defgeneric deploy (staging) @@ -63,7 +63,7 @@ Additional args to render CONTENT can be passed via RENDER-ARGS." (curr (rel-path dest ".curr"))) (ensure-directories-exist new-build) (run-program "mv ~a ~a" staging new-build) - (when (github *config*) + (when (github-pages *config*) (let ((cname-filename (rel-path "" "~a/CNAME" new-build)) (stripped-url (puri:uri-host (puri:parse-uri (domain *config*))))) diff --git a/src/config.lisp b/src/config.lisp index cd188c6..df50586 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -5,7 +5,7 @@ (deploy :initarg :deploy :initform nil :accessor deploy) (domain :initarg :domain :initform "" :accessor domain) (feeds :initarg :feeds :initform nil :accessor feeds) - (github :initarg :github :initform nil :accessor github) + (github-pages :initarg :github-pages :initform nil :accessor github-pages) (license :initarg :license :initform nil :accessor license) (plugins :initarg :plugins :initform nil :accessor plugins) (repo :initarg :repo :initform #p"/" :accessor repo) diff --git a/src/indices.lisp b/src/indices.lisp index bdac10a..225bba2 100644 --- a/src/indices.lisp +++ b/src/indices.lisp @@ -83,6 +83,6 @@ :prev (and (plusp i) i) :next (and (< (* (1+ i) 10) (length results)) (+ 2 i))))))) - (if make-symlink + (if make-symlink-p (update-symlink "index.html" "1.html") (run-program "cp 1.html index.html")))