Rely directly on rdiscount, clean up Tilt load errors

This commit is contained in:
Thomas Reynolds 2011-06-27 13:10:09 -07:00
parent 22efdcfa44
commit 89849b2625
5 changed files with 29 additions and 17 deletions

View file

@ -68,6 +68,8 @@ module Middleman
autoload :Haml, "middleman/renderers/haml"
autoload :Sass, "middleman/renderers/sass"
autoload :Slim, "middleman/renderers/slim"
autoload :Markdown, "middleman/renderers/markdown"
autoload :CoffeeScript, "middleman/renderers/coffee_script"
end
# Features API

View file

@ -44,23 +44,7 @@ module Middleman::Features::FrontMatter
end
end
# MARKDOWN
class MarukuTemplate < ::Tilt::MarukuTemplate
include Middleman::Features::FrontMatter::YamlAware
end
class KramdownTemplate < ::Tilt::KramdownTemplate
include Middleman::Features::FrontMatter::YamlAware
end
class BlueClothTemplate < ::Tilt::BlueClothTemplate
include Middleman::Features::FrontMatter::YamlAware
end
class RedcarpetTemplate < ::Tilt::RedcarpetTemplate
include Middleman::Features::FrontMatter::YamlAware
end
# MARKDOWN
class RDiscountTemplate < ::Tilt::RDiscountTemplate
include Middleman::Features::FrontMatter::YamlAware
end

View file

@ -0,0 +1,12 @@
module Middleman
module Renderers
module CoffeeScript
class << self
def registered(app)
require "coffee_script"
end
alias :included :registered
end
end
end
end

View file

@ -0,0 +1,12 @@
module Middleman
module Renderers
module Markdown
class << self
def registered(app)
require "rdiscount"
end
alias :included :registered
end
end
end
end

View file

@ -78,6 +78,8 @@ module Middleman
register Middleman::Renderers::Slim
register Middleman::Renderers::Haml
register Middleman::Renderers::Sass
register Middleman::Renderers::Markdown
register Middleman::Renderers::CoffeeScript
# Rack helper for adding mime-types during local preview
def self.mime(ext, type)