Add CL-WHO plugin
This commit is contained in:
parent
444698f987
commit
a5c6e365d9
2 changed files with 30 additions and 0 deletions
|
@ -14,6 +14,13 @@
|
|||
|
||||
**Example**: `(analytics :tracking-code "google-provided-unique-id")`
|
||||
|
||||
## CL-WHO
|
||||
|
||||
**Description**: Allows the user to write posts cl-who markup. Just create a
|
||||
post with `format: cl-who` and the plugin will do the rest.
|
||||
|
||||
**Example**: (cl-who)
|
||||
|
||||
## Comments via Disqus
|
||||
|
||||
**Description**: Provides comment support through
|
||||
|
|
23
plugins/cl-who.lisp
Normal file
23
plugins/cl-who.lisp
Normal file
|
@ -0,0 +1,23 @@
|
|||
(eval-when (:compile-toplevel :load-toplevel)
|
||||
(ql:quickload 'cl-who))
|
||||
|
||||
(defpackage :coleslaw-cl-who
|
||||
(:use #:cl #:cl-who)
|
||||
(:import-from #:coleslaw :render-text)
|
||||
(:export #:enable))
|
||||
|
||||
(in-package :coleslaw-cl-who)
|
||||
|
||||
(defmethod render-text (text (format (eql :cl-who)))
|
||||
(let* ((*package* (find-package "COLESLAW-CL-WHO"))
|
||||
(sexps (with-input-from-string (v text)
|
||||
(do* ((line (read v)
|
||||
(read v nil 'done))
|
||||
(acc (list line)
|
||||
(cons line acc)))
|
||||
((eql line 'done)
|
||||
(nreverse (cdr acc)))))))
|
||||
(eval `(with-html-output-to-string (v) ,@sexps))))
|
||||
|
||||
(defun enable ()
|
||||
)
|
Loading…
Add table
Reference in a new issue