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' gem 'dm-postgres-adapter'
# the different markups # the different markups
gem 'redclothcoderay'
gem 'coderay'
gem 'RedCloth' gem 'RedCloth'
gem 'redcarpet' gem 'redcarpet'

View File

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

View File

@ -13,6 +13,9 @@ require 'rack-flash'
# markups # markups
require 'redcloth' require 'redcloth'
require 'redcarpet' require 'redcarpet'
require 'coderay'
require 'redclothcoderay'
RedclothCoderay.coderay_options :css => :class
require 'settings' 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 = { $settings = {
:environment => :development, :environment => :development,
:logging => true, :logging => true,
@ -20,3 +14,5 @@ case $settings[:environment]
:default, 'postgres://<user>:<passphrase>@localhost/<database>' :default, 'postgres://<user>:<passphrase>@localhost/<database>'
) )
end end
RedclothCoderay.coderay_options :css => :class

View File

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