marcoow / syntax_highlighting
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
351994a
tree 5e0814b2e1af990c9ad91fda5ef43a6910bb3f71
parent 4db3e451ee78c4e9baa55aeed70a82f6bd06436b
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Thu Jul 17 13:37:18 -0700 2008 | |
| |
README.rdoc | ||
| |
Rakefile | Fri Feb 29 14:43:41 -0800 2008 | |
| |
app/ | Sun Apr 13 03:25:16 -0700 2008 | |
| |
lib/ | Sat Mar 01 01:48:34 -0800 2008 | |
| |
public/ | Fri Feb 29 14:43:41 -0800 2008 | |
| |
syntax_highlighting_extension.rb | Fri Feb 29 14:43:41 -0800 2008 | |
| |
test/ | Fri Feb 29 14:43:41 -0800 2008 |
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 (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 <r:code [language]> tag like so:
<r:code language="ruby">
class Mylass
def do
puts 'doing'
end
end
</r:code>
Author
Copyright © 2008 Marco Otte-Witte ("), released under the MIT license

