Flexible Lisp Blogware. Fork for personal use. Mirrored from https://github.com/kingcons/coleslaw originally.

posts.lisp 694B

1234567891011121314151617181920
  1. (in-package :coleslaw)
  2. (defgeneric add-post (id title timestamp permalink tags
  3. content &key &allow-other-keys)
  4. (:documentation "Create a post with the given ID, TITLE, TIMESTAMP,
  5. PERMALINK, TAGS and CONTENT and add it to *storage*."))
  6. (defgeneric prettify-code (post)
  7. (:documentation "Ensure that any escaped code in POST is prettified."))
  8. (defgeneric prettify-math-p (post)
  9. (:documentation "Returns T if post needs MathJAX loaded, NIL otherwise."))
  10. (defgeneric render-post (post)
  11. (:documentation "Generate the final HTML for POST."))
  12. (defgeneric remove-post (post)
  13. (:documentation "Remove POST from *storage* and, if necessary,
  14. update the running site."))