public
Description: Syntax Highlighting extension for RadiantCMS
Homepage: http://github.com/marcoow/syntax_highlighting/wikis
Clone URL: git://github.com/marcoow/syntax_highlighting.git
name age message
file MIT-LICENSE Thu Jul 17 13:37:18 -0700 2008 added license file, fixed and formatted README [marcoow]
file README.rdoc Mon Aug 18 01:24:28 -0700 2008 fixing README [marcoow]
file Rakefile Fri Feb 29 14:43:41 -0800 2008 initial commit [Marco Otte-Witte]
directory app/ Sun Apr 13 03:25:16 -0700 2008 fixed exception display [marcoow]
directory lib/ Sat Mar 01 01:48:34 -0800 2008 Reformatted, removed deboug output [Marco Otte-Witte]
directory public/ Fri Feb 29 14:43:41 -0800 2008 initial commit [Marco Otte-Witte]
file syntax_highlighting_extension.rb Fri Feb 29 14:43:41 -0800 2008 initial commit [Marco Otte-Witte]
directory test/ Fri Feb 29 14:43:41 -0800 2008 initial commit [Marco Otte-Witte]
README.rdoc

Syntax Highlighting

The Syntax Highlighting extension adds the new <r:code [language]></r:code> tag to Radiant that converts source code in multiple languages to HTML.

Installation

Installation of the extension requires 4 simple steps.

instally Pygments

The extension uses Pygments (http://pygments.org/) to perform the actual highlightin, so you would have to install that first.

get the extension

From your radiant project’s path, do

  git clone git://github.com/marcoow/syntax_highlighting.git vendor/extensions/syntax_highlighting

run the installation script

  rake radiant:extensions:syntax_highlighting:install

include stylesheets

The syntax_highlighting.css stylesheet is automatically copied to your public/stylesheets directory. All you need to do is to include it in your layout.

Usage

To add highlighted code to a page, use the &lt;r:code [language]&gt; tag like so:

  &lt;r:code language="ruby"&gt;
  class Mylass

    def do
      puts 'doing'
    end

  end
  &lt;/r:code&gt;

Author

Copyright © 2008 Marco Otte-Witte (http://simplabs.com), released under the MIT license

Acknowledgements

The actual highlighting is done by Pygments (http://pygments.org).