From 9a87ae81f36f4f75a73832c37e8fb1170b9b8403 Mon Sep 17 00:00:00 2001 From: Alfredo Beaumont Date: Wed, 29 Mar 2017 21:50:19 +0200 Subject: [PATCH 1/2] Add a plugin to enable pygments in 3bmd --- plugins/pygments.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 plugins/pygments.lisp diff --git a/plugins/pygments.lisp b/plugins/pygments.lisp new file mode 100644 index 0000000..9dc43a5 --- /dev/null +++ b/plugins/pygments.lisp @@ -0,0 +1,8 @@ +(defpackage #:coleslaw-pygments + (:use #:cl) + (:export #:enable)) + +(in-package #:coleslaw-pygments) + +(defun enable () + (setf 3bmd-code-blocks:*renderer* :pygments)) From 5681f5724cfb9e508eb82f37eb59118db28a1182 Mon Sep 17 00:00:00 2001 From: Alfredo Beaumont Date: Thu, 30 Mar 2017 14:48:20 +0200 Subject: [PATCH 2/2] Update documentation with info about Pygments plugin --- README.md | 1 + docs/plugin-use.md | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 8c36bc5..7e56ddc 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Have questions? Come talk to us on IRC in **#coleslaw** on Freenode! * Using LaTeX via [Mathjax](http://mathjax.org/) * Writing posts in ReStructured Text * Importing posts from [Wordpress](http://wordpress.org/) + * Code Highlighting via [Pygments](http://pygments.org/) instead of [colorize](http://www.cliki.net/colorize) ## Example Sites diff --git a/docs/plugin-use.md b/docs/plugin-use.md index d098414..a26d181 100644 --- a/docs/plugin-use.md +++ b/docs/plugin-use.md @@ -213,3 +213,12 @@ CL-USER> (chirp:complete-authentication "4173325") For example `!yt[oeul8fTG9dM|width=480,allowfullscreen]`. **Example**: `(3bmd-youtube)` + +## Code Highlighting via Pygments + +**Description**: Provides code highlighting with [Pygments](http://pygments.org/) + instead of [colorize](http://www.cliki.net/colorize). Pygments supports over + 300 languages and text formats. Look at + [3bmd](https://github.com/3b/3bmd/blob/master/README.md) for more info. + +**Example**: `(pygments)`