0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Rack middleware for Pygments use in environments you cannot install Pygments directly (e.g., Heroku).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.1.0
~> 0.9.0
~> 3.12
~> 2.9.0
~> 0.7

Runtime

~> 1.5.0
~> 0.2.0
>= 0
 Project Readme

rack-pygmoku

Rack::Pygmoku is a middleware for generating code syntax highlighting using the Pygments library in an environment where you cannot install Pygments directly.

In other words, it's ideal for use on Heroku.

Installation

Gem install, as usual:

gem install rack-pygmoku

Then add Pygmoku to your middleware stack:

# Within your Rackup file or similar
use Rack::Pygmoku

Usage

Currently, rack-pygmoku only supports Markdown-style code blocks, like so:

<pre data-lang='ruby'>
  <code>
    def greeting
      'Hello World!'
    end
  </code>
</pre>

Note: Put the short name of the Pygments lexer that you want to use in the data-lang attribute on the pre block.

Status

This is mainly a toy project that I put together for my Nesta-powered blog, and is likely to be maintained as such unless others find it useful.

Copyright

Copyright 2012 Kevin Rohrbaugh.

See LICENSE.txt for further details.