Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rack middleware for Pygments-based syntax highlighting
tree: 23bfbf7fa3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/rack
spec
.document
.gitignore
CHANGELOG
Gemfile
Gemfile.lock
LICENSE.txt
README.markdown
Rakefile
rack-pygmoku.gemspec
watchr.rb

README.markdown

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.

Usage

First, of course, install the gem.

Currently, rack-pygmoku only support 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 or data-lexer 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 (c) 2011 Kevin Rohrbaugh.

See LICENSE.txt for further details.

Something went wrong with that request. Please try again.