This page is under construction. An updated version will be available soon. |
Rouge is a pure-ruby syntax highlighter. It can highlight 100+ different languages, and output HTML or ANSI 256-color text. Its HTML output is compatible with stylesheets designed for pygments.
Advantages over pygments.rb
-
No need to spawn Python processes.
-
We’re faster in almost every measure
Advantages over CodeRay
-
The HTML output from Rouge is fully compatible with stylesheets designed for pygments.
-
The lexers are implemented with a dedicated DSL, rather than being hand-coded.
-
Rouge supports every language CodeRay does and more.
Themes
Id quia id accusamus eius optio aut. Quae velit quas dolorem fugiat. Eum exercitationem deserunt voluptatem occaecati voluptatem. Corporis ut voluptates explicabo aut voluptate accusantium dolores. Soluta reprehenderit dolorem ad fugiat provident dignissimos esse.
Create theme CSS files
Nesciunt incidunt aliquam esse accusantium. Nam repellat voluptatem repellat eveniet quia quod quae explicabo beatae voluptatibus soluta et. Voluptas dolor rerum non fuga reiciendis repudiandae aut aliquam nemo provident eum sed aut.
rougify style base16 > ./base16/theme.css
Available Themes
Praesentium explicabo maiores sit voluptatem. Deleniti doloremque qui facere iste est incidunt. In atque molestias minima quod praesentium labore nihil officia vel.
Theme | Description |
---|---|
base16 | Itaque cumque nostrum omnis ad eos laborum dolorem. Sint quae vitae nemo error assumenda explicabo quo cumque et maxime labore deleniti. |
base16.dark | |
base16.light | |
base16.monokai | |
base16.monokai.dark | |
base16.monokai.light | |
base16.solarized | |
base16.solarized.dark | |
base16.solarized.light | |
colorful | |
github | |
gruvbox | |
gruvbox.dark | |
gruvbox.light | |
igorpro | |
molokai | |
monokai | |
monokai.sublime | |
pastie | |
thankful_eyes | |
tulip |
Languages and Lexers
Quasi sequi ut praesentium neque impedit eum ut sunt provident ea minus et. Aspernatur sapiente pariatur atque. Et qui exercitationem est enim dolorem officiis. Dolore dicta ad excepturi aut dolorem alias dolor. Est fugiat dolorum ullam quo corrupti enim in tenetur pariatur mollitia.
List available Lexers
Note that the canonical, always-up-to-date list of lexers can be found by running:
rougify list
Supported Languages
Rerum ratione delectus illo deleniti. Nesciunt fugiat corporis eaque dignissimos. Non excepturi quo sit nesciunt ducimus in nesciunt harum aut quo.
A - C
Language | Description |
---|---|
actionscript | ActionScript [aliases: as,as3] |
apache | configuration files for Apache web server |
apiblueprint | Markdown based API description language. [aliases: apiblueprint,apib] |
applescript | The AppleScript scripting language by Apple Inc. (http://developer.apple.com/applescript/) |
biml | BIML, Business Intelligence Markup Language |
c | The C programming language |
ceylon | Say more, more clearly. |
cfscript | CFScript, the CFML scripting language [aliases: cfc] |
clojure | The Clojure programming language (clojure.org) [aliases: clj,cljs] |
cmake | The cross-platform, open-source build system |
coffeescript | The Coffeescript programming language (coffeescript.org) [aliases: coffee,coffee-script] |
common_lisp | The Common Lisp variant of Lisp (common-lisp.net) [aliases: cl,common-lisp,elisp,emacs-lisp] |
conf | generic lexer for configuration files [aliases: config,configuration] |
coq | Coq (coq.inria.fr) |
cpp | The C programming language [aliases: c] |
csharp | A multi-paradigm language targeting .NET [aliases: c#,cs] |
css | Cascading Style Sheets, used to style web pages |
D - G
Language | Description |
---|---|
d | The D programming language(dlang.org) [aliases: dlang] |
dart | The Dart programming language (dartlang.com) |
diff | Lexes unified diffs or patches [aliases: patch,udiff] |
dot | Graphviz graph description language |
eiffel | Eiffel programming language |
elixir | Elixir language (elixir-lang.org) [aliases: elixir,exs] |
erb | Embedded ruby template files [aliases: eruby,rhtml] |
erlang | The Erlang programming language (erlang.org) [aliases: erl] |
factor | Factor, the practical stack language (factorcode.org) |
fortran | Fortran 95 Programming Language |
gherkin | A business-readable spec DSL ( github.com/cucumber/cucumber/wiki/Gherkin ) [aliases: cucumber,behat] |
glsl | The GLSL shader language |
go | The Go programming language (http://golang.org) [aliases: go,golang] |
gradle | A powerful build system for the JVM |
groovy | The Groovy programming language (http://www.groovy-lang.org/) |
H - L
Language | Description |
---|---|
haml | The Haml templating system for Ruby (haml.info) [aliases: HAML] |
handlebars | The Handlebars and Mustache templating languages [aliases: hbs,mustache] |
haskell | The Haskell programming language (haskell.org) [aliases: hs] |
html | HTML, the markup language of the web |
http | http requests and responses |
ini | The INI configuration format |
io | The IO programming language (http://iolanguage.com) |
java | The Java programming language (java.com) |
javascript | JavaScript, the browser scripting language [aliases: js] |
jinja | Django/Jinja template engine (jinja.pocoo.org) [aliases: django] |
json | JavaScript Object Notation (json.org) |
json-doc | JavaScript Object Notation with extenstions for documentation |
jsonnet | An elegant, formally-specified config language for JSON |
julia | The Julia programming language [aliases: jl] |
kotlin | Kotlin http://kotlinlang.org |
liquid | Liquid is a templating engine for Ruby (liquidmarkup.org) |
literate_coffeescript | Literate coffeescript [aliases: litcoffee] |
literate_haskell | Literate haskell [aliases: lithaskell,lhaskell,lhs] |
llvm | The LLVM Compiler Infrastructure (http://llvm.org/) |
lua | Lua (http://www.lua.org) |
M - Q
Language | Description |
---|---|
make | Makefile syntax [aliases: makefile,mf,gnumake,bsdmake] |
markdown | Markdown, a light-weight markup language for authors [aliases: md,mkd] |
matlab | Matlab [aliases: m] |
mosel | Optimization language used by Fico’s Xpress. (http://www.fico.com/en/products/fico-xpress-optimization-suite/) |
moonscript | Moonscript (http://www.moonscript.org) [aliases: moon] |
nasm | Netwide Assembler |
nginx | configuration files for the nginx web server (nginx.org) |
nim | The Nim programming language (http://nim-lang.org/) [aliases: nimrod] |
objective_c | An extension of C commonly used to write Apple software [aliases: objc] |
ocaml | Objective CAML (ocaml.org) |
pascal | A procedural programming language commonly used as a teaching language. |
perl | The Perl scripting language (perl.org) [aliases: pl] |
php | The PHP scripting language (php.net) [aliases: php,php3,php4,php5] |
plaintext | A boring lexer that doesn’t highlight anything [aliases: text] |
powershell | The Windows powershell [aliases: posh] |
praat | The Praat scripting language (praat.org) |
prolog | The Prolog programming language (http://en.wikipedia.org/wiki/Prolog) [aliases: prolog] |
properties | |
protouf | Google’s language-neutral, platform-neutral, extensible mechanism for serializing structured data [aliases: proto] |
puppet | The Puppet configuration management language (puppetlabs.org) [aliases: pp] |
python | The Python programming language (python.org) [aliases: py] |
qml | QML, a UI markup language [aliases: qml] |
R - S
Language | Description |
---|---|
r | The R statistics language (r-project.org) [aliases: r,R,s,S] |
racket | Racket is a Lisp descended from Scheme (racket-lang.org) |
ruby | The Ruby programming language (ruby-lang.org) [aliases: rb] |
rust | The Rust programming language (rust-lang.org) [aliases: rs] |
sass | The Sass stylesheet language language (sass-lang.com) |
scala | The Scala programming language (scala-lang.org) [aliases: scala] |
scheme | The Scheme variant of Lisp |
scss | SCSS stylesheets (sass-lang.com) |
sed | sed, the ultimate stream editor |
shell | Various shell languages, including sh and bash [aliases: bash,zsh,ksh,sh] |
shell_session | A generic lexer for shell session and command line [aliases: terminal,console] |
slim | The Slim template language |
smalltalk | The Smalltalk programming language [aliases: st,squeak] |
smarty | Smarty Template Engine [aliases: smarty] |
sml | Standard ML [aliases: ml] |
sql | Structured Query Language, for relational databases |
swift | Multi paradigm, compiled programming language developed by Apple for iOS and OS X development.(developer.apple.com/swift) |
T - Z
Language | Description |
---|---|
tap | Test Anything Protocol [aliases: tap] |
tcl | The Tool Command Language (tcl.tk) |
tex | The TeX typesetting system [aliases: TeX,LaTeX,latex] |
toml | The TOML configuration format (https://github.com/mojombo/toml) |
tulip | The tulip programming language http://github.com/jneen/tulip [aliases: tlp] |
twig | Twig template engine (twig.sensiolabs.org) |
typescript | TypeScript, a superset of JavaScript [aliases: ts] |
vb | Visual Basic [aliases: visualbasic] |
verilog | The System Verilog hardware description language |
viml | VimL, the scripting language for the Vim editor (vim.org) [aliases: vim,vimscript,ex] |
xml | XML |
yaml | Yaml Ain’t Markup Language (yaml.org) [aliases: yml] |