From 91a1ac083c97a389aba1eb72adbf47140d51b618 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Thu, 1 Apr 2010 07:57:37 +1100 Subject: [PATCH] Apply RubyPants to entire generated page --- Rules | 10 +++++++--- lib/smart_rdiscount.rb | 13 ------------- 2 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 lib/smart_rdiscount.rb diff --git a/Rules b/Rules index d6872b0..c8f6823 100644 --- a/Rules +++ b/Rules @@ -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 diff --git a/lib/smart_rdiscount.rb b/lib/smart_rdiscount.rb deleted file mode 100644 index bac131d..0000000 --- a/lib/smart_rdiscount.rb +++ /dev/null @@ -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