Merge pull request #132 from abeaumont/pygments-plugin

Add a plugin to enable pygments in 3bmd
This commit is contained in:
Javier Olaechea 2017-03-30 07:59:53 -05:00 committed by GitHub
commit 9ff2aa0944
3 changed files with 18 additions and 0 deletions

View file

@ -33,6 +33,7 @@ Have questions? Come talk to us on IRC in **#coleslaw** on Freenode!
* Using LaTeX via [Mathjax](http://mathjax.org/) * Using LaTeX via [Mathjax](http://mathjax.org/)
* Writing posts in ReStructured Text * Writing posts in ReStructured Text
* Importing posts from [Wordpress](http://wordpress.org/) * Importing posts from [Wordpress](http://wordpress.org/)
* Code Highlighting via [Pygments](http://pygments.org/) instead of [colorize](http://www.cliki.net/colorize)
## Example Sites ## Example Sites

View file

@ -213,3 +213,12 @@ CL-USER> (chirp:complete-authentication "4173325")
For example `!yt[oeul8fTG9dM|width=480,allowfullscreen]`. For example `!yt[oeul8fTG9dM|width=480,allowfullscreen]`.
**Example**: `(3bmd-youtube)` **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)`

8
plugins/pygments.lisp Normal file
View file

@ -0,0 +1,8 @@
(defpackage #:coleslaw-pygments
(:use #:cl)
(:export #:enable))
(in-package #:coleslaw-pygments)
(defun enable ()
(setf 3bmd-code-blocks:*renderer* :pygments))