mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 04:42:47 +00:00
Add Rouge
This commit is contained in:
parent
cac44fba1e
commit
7659eeb4f1
4 changed files with 15 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -17,6 +17,7 @@ gem 'systemu'
|
|||
gem 'listen'
|
||||
gem 'guard-nanoc'
|
||||
gem 'adsf'
|
||||
gem 'rouge'
|
||||
|
||||
if RbConfig::CONFIG['target_os'] =~ /(?i-mx:bsd|dragonfly)/
|
||||
gem 'rb-kqueue', '>= 0.2'
|
||||
|
|
|
@ -95,6 +95,7 @@ GEM
|
|||
ffi (>= 0.5.0, < 2)
|
||||
rdiscount (2.2.0.1)
|
||||
ref (2.0.0)
|
||||
rouge (3.2.1)
|
||||
ruby_dep (1.5.0)
|
||||
rubypants (0.6.0)
|
||||
sass (3.5.1)
|
||||
|
@ -126,6 +127,7 @@ DEPENDENCIES
|
|||
nokogiri
|
||||
rake
|
||||
rdiscount
|
||||
rouge
|
||||
rubypants
|
||||
sass
|
||||
systemu
|
||||
|
|
7
Rules
7
Rules
|
@ -21,6 +21,7 @@ compile %r(/\d{4}/.*) do
|
|||
layout 'article'
|
||||
layout 'default'
|
||||
filter :rubypants
|
||||
filter :colorize_syntax, default_colorizer: :rouge
|
||||
end
|
||||
|
||||
compile %r(/about/.*) do
|
||||
|
@ -41,6 +42,10 @@ compile %r{^/(?:screen|mobile)/$} do
|
|||
filter :sass
|
||||
end
|
||||
|
||||
compile %r{/rouge/$} do
|
||||
filter :erb
|
||||
end
|
||||
|
||||
compile '*' do
|
||||
filter :rdiscount
|
||||
layout 'default'
|
||||
|
@ -64,7 +69,7 @@ end
|
|||
# (path.dirname + 'articles.json').to_s
|
||||
# end
|
||||
|
||||
route %r{^/(?:screen|mobile)/$} do
|
||||
route %r{^/(?:screen|mobile|rouge)/$} do
|
||||
File.join("", "css", File.basename(item.identifier) + ".css")
|
||||
end
|
||||
|
||||
|
|
6
content/rouge.css.erb
Normal file
6
content/rouge.css.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%= Rouge::Themes::Base16::Solarized.render(scope: 'pre') %>
|
||||
|
||||
pre {
|
||||
padding: 0 5px 5px;
|
||||
border-radius: 3px;
|
||||
}
|
Loading…
Reference in a new issue