diff --git a/README b/README index c8921cc..32e1e81 100644 --- a/README +++ b/README @@ -1,16 +1,18 @@ Coleslaw aims to be flexible blog software suitable for replacing a single-user static site compiler such as Jekyll. +Full docs coming soon... + Features: * Git for storage +* RSS feeds! * Plugins to... ** Import from wordpress ** Use Mathjax/LaTeX -** Host on Amazon S3 Forthcoming: * Markdown support * RST support -* Atom or RSS feeds +* Host on Amazon S3 * Code highlighting References: diff --git a/docs/coleslaw.html b/docs/coleslaw.html new file mode 100644 index 0000000..d463458 --- /dev/null +++ b/docs/coleslaw.html @@ -0,0 +1,99 @@ + + + + +API for COLESLAW + + + +
+
API for package: +coleslaw
+
+
Homepage: Github
+
+
+-Functions
+
+
+
+add-injection +str location +standard-generic-function
+
+
Add STR to the list of elements injected in LOCATION.
+
+
+deploy +dir +standard-generic-function
+
+
Deploy DIR, updating the .prev and .curr symlinks.
+
+
+main + +function
+
+
:undocumented
+
+
+render-content +text format +standard-generic-function
+
+
Compile TEXT from the given FORMAT to HTML for display.
+
+
+render-feed + +function
+
+
Render and write the feed for the site.
+ \ No newline at end of file diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index ad552d6..db31214 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -25,8 +25,9 @@ on files that match the given extension." `,body)) (list-directory ,path)))) -(defun render-page (path html) - "Populate the base template with the provided HTML and write it out to PATH." +(defun render-page (path html &optional raw) + "Populate the base template with the provided HTML and write it out to PATH. +If RAW is non-nil, write the content without wrapping it in the base template." (let ((filepath (merge-pathnames path (staging *config*)))) (ensure-directories-exist filepath) (with-open-file (out filepath @@ -43,7 +44,7 @@ on files that match the given extension." (gethash :body *injections*)) :license (license *config*) :credits (author *config*))))) - (write-line content out))))) + (write-line (if raw html content) out))))) (defun compile-blog () "Compile the blog to a staging directory in /tmp." diff --git a/src/feeds.lisp b/src/feeds.lisp index 3dce91d..bc2521b 100644 --- a/src/feeds.lisp +++ b/src/feeds.lisp @@ -20,7 +20,7 @@ (format nil "" string)) (defun render-feed () - "Render and write the RSS feed for the site." + "Render and write the feed for the site." (let* ((posts (subseq (by-date (hash-table-values *posts*)) 0 10)) (content (loop for post in posts collect (list :title (post-title post) @@ -34,4 +34,4 @@ :title (title *config*) :siteroot (domain *config*) :author (author *config*) - :posts content)))) + :posts content)) t)) diff --git a/src/packages.lisp b/src/packages.lisp index 112b3ec..aa3c226 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -1,4 +1,5 @@ (defpackage :coleslaw + (:documentation "Homepage: Github") (:use :cl :closure-template) (:import-from :cl-fad #:delete-directory-and-files #:list-directory) @@ -10,4 +11,5 @@ (:export #:main #:add-injection #:render-content + #:render-feed #:deploy))