Recently Written · git

coleslaw

Emacs mode for the "Coleslaw" site generator written in Common Lisp.

git clone https://github.com/equwal/coleslaw

Log | Files | Refs


plugins/isso.lisp (546 bytes)

1 (defpackage :coleslaw-isso
2   (:use :cl)
3   (:export #:enable)
4   (:import-from :coleslaw #:add-injection
5                           #:post))
6 
7 (in-package :coleslaw-isso)
8 
9 (defvar *isso-header*
10   "<div class=\"comments\">
11       <section id=\"isso-thread\"></section>
12       <script data-isso=\"~a/\"
13               src=\"~a/js/embed.min.js\"></script>
14     </div>")
15 
16 (defun enable (&key isso-url)
17   (flet ((inject-p (x)
18            (when (typep x 'post)
19              (format nil *isso-header* isso-url isso-url))))
20     (add-injection #'inject-p :body)))