diff --git a/plugins/disqus.lisp b/plugins/disqus.lisp index ca89f89..36f9545 100644 --- a/plugins/disqus.lisp +++ b/plugins/disqus.lisp @@ -3,9 +3,6 @@ (in-package :coleslaw-disqus) -;; Should be added to plugins like so: -; :plugins (mathjax (disqus :shortname "mysite-disqus-shortname")) - (defvar *disqus-header* "
") (defun enable () - (coleslaw:add-injection *mathjax-header* :head)) + (labels ((math-post-p (post) + (member "math" (post-tags post) :test #'string=)) + (mathjax-p (content) + (etypecase content + (post (math-post-p content)) + (index (some #'math-post-p (index-posts content)))))) + (coleslaw:add-injection (list *mathjax-header* #'mathjax-p) :head)))