1
0
Fork 0
forked from wezm/wezm.net

Apply RubyPants to entire generated page

This commit is contained in:
Wesley Moore 2010-04-01 07:57:37 +11:00
parent aabdf612bc
commit 91a1ac083c
2 changed files with 7 additions and 16 deletions

10
Rules
View file

@ -4,6 +4,7 @@ require 'pathname'
compile '/' do
layout 'home'
filter :rubypants
end
compile '*/json/' do
@ -13,12 +14,14 @@ end
compile %r{/(?:technical|personal|)articles/(page/|)} do
filter :erb
layout 'articles'
filter :rubypants
end
compile %r(/\d{4}/*) do
filter :smart_rdiscount
compile %r(/\d{4}/.*) do
filter :rdiscount
layout 'article'
layout 'default'
filter :rubypants
end
compile %r{.*/feed/} do
@ -30,8 +33,9 @@ compile %r{(?:/robots/|/sitemap)} do
end
compile '*' do
filter :smart_rdiscount
filter :rdiscount
layout 'default'
filter :rubypants
end
route '*/json/' do

View file

@ -1,13 +0,0 @@
module WezM::Filters
class SmartRDiscount < Nanoc3::Filter
def run(content, params={})
require 'rdiscount'
markdown = ::RDiscount.new(content)
markdown.smart = true
markdown.to_html
end
end
end
Nanoc3::Filter.register '::WezM::Filters::SmartRDiscount', :smart_rdiscount