0
0

added syntax highlighting for code

This commit is contained in:
Gibheer 2011-07-19 19:14:10 +02:00
parent b2a6dddb0c
commit 7517ca6819
5 changed files with 19 additions and 12 deletions

View File

@ -10,5 +10,7 @@ gem 'data_mapper'
gem 'dm-postgres-adapter'
# the different markups
gem 'redclothcoderay'
gem 'coderay'
gem 'RedCloth'
gem 'redcarpet'

View File

@ -5,7 +5,8 @@ GEM
addressable (2.2.6)
bcrypt-ruby (2.1.4)
chunky_png (1.2.0)
compass (0.11.3)
coderay (0.9.8)
compass (0.11.5)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
@ -58,17 +59,20 @@ GEM
fssm (0.2.7)
haml (3.1.2)
json (1.4.6)
rack (1.3.0)
rack-flash (0.1.1)
rack (1.3.1)
rack-flash (0.1.2)
rack
redcarpet (1.17.2)
sass (3.1.3)
redclothcoderay (0.3.6)
RedCloth
coderay
sass (3.1.4)
sinatra (1.2.6)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
sinatra-support (1.2.0)
sinatra (>= 1.0)
stringex (1.2.1)
stringex (1.2.2)
tilt (1.3.2)
uuidtools (2.1.2)
@ -77,12 +81,14 @@ PLATFORMS
DEPENDENCIES
RedCloth
coderay
compass
data_mapper
dm-postgres-adapter
haml
rack-flash
redcarpet
redclothcoderay
sass
sinatra
sinatra-support

View File

@ -13,6 +13,9 @@ require 'rack-flash'
# markups
require 'redcloth'
require 'redcarpet'
require 'coderay'
require 'redclothcoderay'
RedclothCoderay.coderay_options :css => :class
require 'settings'

View File

@ -1,9 +1,3 @@
Compass.configuration do |config|
config.sass_dir = 'views'
config.project_path = File.dirname(__FILE__)
config.output_style = :expanded
end
$settings = {
:environment => :development,
:logging => true,
@ -20,3 +14,5 @@ case $settings[:environment]
:default, 'postgres://<user>:<passphrase>@localhost/<database>'
)
end
RedclothCoderay.coderay_options :css => :class

View File

@ -4,4 +4,4 @@
%footer
.author=@post.account.username
.date=@post.written
%section=markup(@post.content, @post.markup)
%section~markup(@post.content, @post.markup)