diff --git a/plugins/twitter-summary-card.lisp b/plugins/twitter-summary-card.lisp index 8a13889..77aff6f 100644 --- a/plugins/twitter-summary-card.lisp +++ b/plugins/twitter-summary-card.lisp @@ -1,5 +1,5 @@ (defpackage :coleslaw-twitter-summary-card - (:use :cl) + (:use :cl :coleslaw) (:export #:enable)) (in-package :coleslaw-twitter-summary-card) @@ -7,12 +7,15 @@ (defun summary-card (post twitter-handle) "TODO: Figure if and how to include twitter:url meta property." (format nil " -~@[~] - -" +~@[~] + +" twitter-handle (title-of post) - (content-text post))) + (let ((text (content-text post))) + (if (< 200 (length text)) + (subseq text 0 199) + text)))) (defun enable (&key twitter-handle) (add-injection