Add some static-specific vars, DWIMfix to find-by-range, update .gitignore, small post template improvement.

This commit is contained in:
Brit Butler 2011-04-18 17:21:55 -04:00
parent 1e34b55483
commit bbe06ffe4d
5 changed files with 34 additions and 6 deletions

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
*~ *~
*.fasl *.fasl
ignore/
generated/

8
TODO
View file

@ -12,9 +12,12 @@ Ideas:
;;;; DYNAMIC ;;;; DYNAMIC
;;;; STATIC ;;;; STATIC
;;;; implement *output-dir*, render-site. ;;;; implement render-site, head-inject/body-inject/navigation.
;;;; non-disqus comment support?
;;; posts ;;; posts
;; Make find-by-date, post-url not suck. ;; Make find-by-date, post-url not suck.
;; -- re: post-url, escaping is insufficient and there are collisions by title.
;; -- What are alternatives?
;;;; PLUGINS ;;;; PLUGINS
;;;; implement disqus support ;;;; implement disqus support
@ -22,8 +25,7 @@ Ideas:
;; add comment handling ... (when comments ...) ;; add comment handling ... (when comments ...)
;; support old URLs via use of post-aliases? ;; support old URLs via use of post-aliases?
;;;; rendering hooks (eg. :pygmentize, :xpost-lj?) ;;;; rendering hooks (pygmentize, xposting) via :around/:before/:after methods
;; may need pre- and post- but for now stick to post-.
;; get run on rendered html before "storage" ;; get run on rendered html before "storage"
;; xposting may be a rendering hook but may necessitate publishing hooks ;; xposting may be a rendering hook but may necessitate publishing hooks
;; again, these should be methods on a generic function ;; again, these should be methods on a generic function

View file

@ -1,5 +1,27 @@
(in-package :coleslaw) (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 () (defun static-init ()
(setf *storage* (make-hash-table)) (setf *storage* (make-hash-table))
(loop for table in '(:authors :comments :posts :indices :credentials) (loop for table in '(:authors :comments :posts :indices :credentials)

View file

@ -57,7 +57,9 @@
results)) results))
(defmethod find-by-range (start end) (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) (defmethod post-url (id)
(flet ((escape (str) (flet ((escape (str)

View file

@ -14,8 +14,8 @@
{$content |noAutoescape} {$content |noAutoescape}
</div>{\n} </div>{\n}
<div class="relative-nav">{\n} <div class="relative-nav">{\n}
{if $prev} <a href="{$prev}">Previous</a> {/if} {if $prev} <a href="{$prev}">Previous</a><br> {/if}{\n}
{if $next} <a href="{$next}">Next</a> {/if} {if $next} <a href="{$next}">Next</a><br> {/if}{\n}
</div>{\n} </div>{\n}
{if $comments} {if $comments}
<div class="comments">{$comments |noAutoescape}</div> <div class="comments">{$comments |noAutoescape}</div>