diff --git a/.gitignore b/.gitignore index 3d894d7..cb887e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *~ *.fasl +ignore/ +generated/ diff --git a/TODO b/TODO index 082bf5c..31be6c9 100644 --- a/TODO +++ b/TODO @@ -12,9 +12,12 @@ Ideas: ;;;; DYNAMIC ;;;; STATIC -;;;; implement *output-dir*, render-site. +;;;; implement render-site, head-inject/body-inject/navigation. +;;;; non-disqus comment support? ;;; posts ;; Make find-by-date, post-url not suck. +;; -- re: post-url, escaping is insufficient and there are collisions by title. +;; -- What are alternatives? ;;;; PLUGINS ;;;; implement disqus support @@ -22,8 +25,7 @@ Ideas: ;; add comment handling ... (when comments ...) ;; support old URLs via use of post-aliases? -;;;; rendering hooks (eg. :pygmentize, :xpost-lj?) -;; may need pre- and post- but for now stick to post-. +;;;; rendering hooks (pygmentize, xposting) via :around/:before/:after methods ;; get run on rendered html before "storage" ;; xposting may be a rendering hook but may necessitate publishing hooks ;; again, these should be methods on a generic function diff --git a/static/coleslaw.lisp b/static/coleslaw.lisp index 4e8870a..47f8638 100644 --- a/static/coleslaw.lisp +++ b/static/coleslaw.lisp @@ -1,5 +1,27 @@ (in-package :coleslaw) +(defvar *site-root* nil + "A string representing the base URL of the site, +e.g. \"http://blog.redlinernotes.com/\".") + +(defvar *site-title* nil + "A string containing the title of the site, +e.g. \"Improved Means for Achieving Deterioriated Ends\".") + +(defvar *site-credits* nil + "A string containing the credits of the site, +e.g. \"Brit Butler (year)\".") + +(defvar *site-license* nil + "A string containing the (optional) license of the site, +e.g. \"CC-BY-SA\". Otherwise, standard copyright is assumed.") + +(defvar *output-directory* nil + "The path where the compiled coleslaw site will be output.") + +(defvar *input-directory* nil + "The directory which will be watched for new posts.") + (defun static-init () (setf *storage* (make-hash-table)) (loop for table in '(:authors :comments :posts :indices :credentials) diff --git a/static/posts.lisp b/static/posts.lisp index 942aca6..7f11252 100644 --- a/static/posts.lisp +++ b/static/posts.lisp @@ -57,7 +57,9 @@ results)) (defmethod find-by-range (start end) - (loop for id from start upto end collecting (find-post id))) + (if (> start end) + (loop for id from start downto end collecting (find-post id)) + (loop for id from start upto end collecting (find-post id)))) (defmethod post-url (id) (flet ((escape (str) diff --git a/themes/hyde/post.tmpl b/themes/hyde/post.tmpl index 0a60b37..6d6c525 100644 --- a/themes/hyde/post.tmpl +++ b/themes/hyde/post.tmpl @@ -14,8 +14,8 @@ {$content |noAutoescape} {\n}
{\n} - {if $prev} Previous {/if} - {if $next} Next {/if} + {if $prev} Previous
{/if}{\n} + {if $next} Next
{/if}{\n}
{\n} {if $comments}
{$comments |noAutoescape}