Permalink
Browse files

Support syntax-highlighted blocks of code.

  • Loading branch information...
1 parent c8b97f0 commit 05f3f027976888da580a4ab3d24eaa8d28ab6f9a @nex3 nex3 committed Sep 24, 2012
View
@@ -4,3 +4,4 @@ gem "compass"
gem "compass_twitter_bootstrap", :git => "git://github.com/toao/compass-twitter-bootstrap.git"
gem "jekyll"
gem "foreman"
+gem "pygments.rb"
View
@@ -10,6 +10,7 @@ GEM
specs:
albino (1.3.3)
posix-spawn (>= 0.3.6)
+ blankslate (3.1.2)
chunky_png (1.2.6)
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
@@ -19,6 +20,7 @@ GEM
sass (~> 3.1)
directory_watcher (1.4.1)
fast-stemmer (1.0.1)
+ ffi (1.0.11)
foreman (0.58.0)
thor (>= 0.13.6)
fssm (0.2.9)
@@ -34,6 +36,11 @@ GEM
maruku (0.6.0)
syntax (>= 1.0.0)
posix-spawn (0.3.6)
+ pygments.rb (0.2.13)
+ rubypython (~> 0.5.3)
+ rubypython (0.5.3)
+ blankslate (>= 2.1.2.3)
+ ffi (~> 1.0.7)
sass (3.2.1)
syntax (1.0.0)
thor (0.16.0)
@@ -46,3 +53,4 @@ DEPENDENCIES
compass_twitter_bootstrap!
foreman
jekyll
+ pygments.rb
View
@@ -53,9 +53,11 @@ Once everything is installed, you can run the tests by running:
The CSS files are generated from the source [Sass][] files using [Compass][].
The HTML documentation files are generated from the source [Markdown][] using
-[Jekyll][]. To get ready to make changes, you'll need [Ruby][] and then:
+[Jekyll][]. To get ready to make changes, you'll need [Ruby][] and [Python][].
+Then:
[ruby]: http://ruby-lang.org
+[python]: http://python.org
[sass]: http://sass-lang.com
[compass]: http://compass-style.org
[markdown]: http://daringfireball.net/projects/markdown/
@@ -69,6 +71,10 @@ The HTML documentation files are generated from the source [Markdown][] using
bundle install
+ 3. Run this to install the latest version of Pygments for syntax highlighting:
+
+ sudo pip install --upgrade pygments
+
Note that this is only needed on your development machine to iterate on the CSS
and documentation. The deployed server just uses the pre-compiled CSS and HTML
and only requires Python.
View
@@ -0,0 +1,59 @@
+.highlight .c { color: #999988; font-style: italic } // Comment
+.highlight .err { color: #a61717; background-color: #e3d2d2 } // Error
+.highlight .k { font-weight: bold } // Keyword
+.highlight .o { font-weight: bold } // Operator
+.highlight .cm { color: #999988; font-style: italic } // Comment.Multiline
+.highlight .cp { color: #999999; font-weight: bold } // Comment.Preproc
+.highlight .c1 { color: #999988; font-style: italic } // Comment.Single
+.highlight .cs { color: #999999; font-weight: bold; font-style: italic } // Comment.Special
+.highlight .gd { color: #000000; background-color: #ffdddd } // Generic.Deleted
+.highlight .gd .x { color: #000000; background-color: #ffaaaa } // Generic.Deleted.Specific
+.highlight .ge { font-style: italic } // Generic.Emph
+.highlight .gr { color: #aa0000 } // Generic.Error
+.highlight .gh { color: #999999 } // Generic.Heading
+.highlight .gi { color: #000000; background-color: #ddffdd } // Generic.Inserted
+.highlight .gi .x { color: #000000; background-color: #aaffaa } // Generic.Inserted.Specific
+.highlight .go { color: #888888 } // Generic.Output
+.highlight .gp { color: #555555 } // Generic.Prompt
+.highlight .gs { font-weight: bold } // Generic.Strong
+.highlight .gu { color: #aaaaaa } // Generic.Subheading
+.highlight .gt { color: #aa0000 } // Generic.Traceback
+.highlight .kc { font-weight: bold } // Keyword.Constant
+.highlight .kd { font-weight: bold } // Keyword.Declaration
+.highlight .kp { font-weight: bold } // Keyword.Pseudo
+.highlight .kr { font-weight: bold } // Keyword.Reserved
+.highlight .kt { color: #445588; font-weight: bold } // Keyword.Type
+.highlight .m { color: #009999 } // Literal.Number
+.highlight .s { color: #d14 } // Literal.String
+.highlight .na { color: #008080 } // Name.Attribute
+.highlight .nb { color: #0086B3 } // Name.Builtin
+.highlight .nc { color: #445588; font-weight: bold } // Name.Class
+.highlight .no { color: #008080 } // Name.Constant
+.highlight .ni { color: #800080 } // Name.Entity
+.highlight .ne { color: #990000; font-weight: bold } // Name.Exception
+.highlight .nf { color: #990000; font-weight: bold } // Name.Function
+.highlight .nn { color: #555555 } // Name.Namespace
+.highlight .nt { color: #000080 } // Name.Tag
+.highlight .nv { color: #008080 } // Name.Variable
+.highlight .ow { font-weight: bold } // Operator.Word
+.highlight .w { color: #bbbbbb } // Text.Whitespace
+.highlight .mf { color: #009999 } // Literal.Number.Float
+.highlight .mh { color: #009999 } // Literal.Number.Hex
+.highlight .mi { color: #009999 } // Literal.Number.Integer
+.highlight .mo { color: #009999 } // Literal.Number.Oct
+.highlight .sb { color: #d14 } // Literal.String.Backtick
+.highlight .sc { color: #d14 } // Literal.String.Char
+.highlight .sd { color: #d14 } // Literal.String.Doc
+.highlight .s2 { color: #d14 } // Literal.String.Double
+.highlight .se { color: #d14 } // Literal.String.Escape
+.highlight .sh { color: #d14 } // Literal.String.Heredoc
+.highlight .si { color: #d14 } // Literal.String.Interpol
+.highlight .sx { color: #d14 } // Literal.String.Other
+.highlight .sr { color: #009926 } // Literal.String.Regex
+.highlight .s1 { color: #d14 } // Literal.String.Single
+.highlight .ss { color: #990073 } // Literal.String.Symbol
+.highlight .bp { color: #999999 } // Name.Builtin.Pseudo
+.highlight .vc { color: #008080 } // Name.Variable.Class
+.highlight .vg { color: #008080 } // Name.Variable.Global
+.highlight .vi { color: #008080 } // Name.Variable.Instance
+.highlight .il { color: #009999 } // Literal.Number.Integer.Long
View
@@ -2,6 +2,8 @@
@import "compass/reset";
+@import "syntax";
+
$baseFontSize: 14px;
$baseLineHeight: 24px;
View
@@ -55,6 +55,257 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
display: block;
}
+.highlight .c {
+ color: #999988;
+ font-style: italic;
+}
+
+.highlight .err {
+ color: #a61717;
+ background-color: #e3d2d2;
+}
+
+.highlight .k {
+ font-weight: bold;
+}
+
+.highlight .o {
+ font-weight: bold;
+}
+
+.highlight .cm {
+ color: #999988;
+ font-style: italic;
+}
+
+.highlight .cp {
+ color: #999999;
+ font-weight: bold;
+}
+
+.highlight .c1 {
+ color: #999988;
+ font-style: italic;
+}
+
+.highlight .cs {
+ color: #999999;
+ font-weight: bold;
+ font-style: italic;
+}
+
+.highlight .gd {
+ color: #000000;
+ background-color: #ffdddd;
+}
+
+.highlight .gd .x {
+ color: #000000;
+ background-color: #ffaaaa;
+}
+
+.highlight .ge {
+ font-style: italic;
+}
+
+.highlight .gr {
+ color: #aa0000;
+}
+
+.highlight .gh {
+ color: #999999;
+}
+
+.highlight .gi {
+ color: #000000;
+ background-color: #ddffdd;
+}
+
+.highlight .gi .x {
+ color: #000000;
+ background-color: #aaffaa;
+}
+
+.highlight .go {
+ color: #888888;
+}
+
+.highlight .gp {
+ color: #555555;
+}
+
+.highlight .gs {
+ font-weight: bold;
+}
+
+.highlight .gu {
+ color: #aaaaaa;
+}
+
+.highlight .gt {
+ color: #aa0000;
+}
+
+.highlight .kc {
+ font-weight: bold;
+}
+
+.highlight .kd {
+ font-weight: bold;
+}
+
+.highlight .kp {
+ font-weight: bold;
+}
+
+.highlight .kr {
+ font-weight: bold;
+}
+
+.highlight .kt {
+ color: #445588;
+ font-weight: bold;
+}
+
+.highlight .m {
+ color: #009999;
+}
+
+.highlight .s {
+ color: #d14;
+}
+
+.highlight .na {
+ color: #008080;
+}
+
+.highlight .nb {
+ color: #0086B3;
+}
+
+.highlight .nc {
+ color: #445588;
+ font-weight: bold;
+}
+
+.highlight .no {
+ color: #008080;
+}
+
+.highlight .ni {
+ color: #800080;
+}
+
+.highlight .ne {
+ color: #990000;
+ font-weight: bold;
+}
+
+.highlight .nf {
+ color: #990000;
+ font-weight: bold;
+}
+
+.highlight .nn {
+ color: #555555;
+}
+
+.highlight .nt {
+ color: #000080;
+}
+
+.highlight .nv {
+ color: #008080;
+}
+
+.highlight .ow {
+ font-weight: bold;
+}
+
+.highlight .w {
+ color: #bbbbbb;
+}
+
+.highlight .mf {
+ color: #009999;
+}
+
+.highlight .mh {
+ color: #009999;
+}
+
+.highlight .mi {
+ color: #009999;
+}
+
+.highlight .mo {
+ color: #009999;
+}
+
+.highlight .sb {
+ color: #d14;
+}
+
+.highlight .sc {
+ color: #d14;
+}
+
+.highlight .sd {
+ color: #d14;
+}
+
+.highlight .s2 {
+ color: #d14;
+}
+
+.highlight .se {
+ color: #d14;
+}
+
+.highlight .sh {
+ color: #d14;
+}
+
+.highlight .si {
+ color: #d14;
+}
+
+.highlight .sx {
+ color: #d14;
+}
+
+.highlight .sr {
+ color: #009926;
+}
+
+.highlight .s1 {
+ color: #d14;
+}
+
+.highlight .ss {
+ color: #990073;
+}
+
+.highlight .bp {
+ color: #999999;
+}
+
+.highlight .vc {
+ color: #008080;
+}
+
+.highlight .vg {
+ color: #008080;
+}
+
+.highlight .vi {
+ color: #008080;
+}
+
+.highlight .il {
+ color: #009999;
+}
+
/*
* Bootstrap v2.0.3
*
Oops, something went wrong.

0 comments on commit 05f3f02

Please sign in to comment.