diff --git a/lib/middleman/core_extensions/rendering.rb b/lib/middleman/core_extensions/rendering.rb index 537cbcca..7b8a2c54 100644 --- a/lib/middleman/core_extensions/rendering.rb +++ b/lib/middleman/core_extensions/rendering.rb @@ -1,8 +1,14 @@ module Middleman::CoreExtensions::Rendering class << self def registered(app) + # Autoload require "coffee_script" + begin + require "slim" + rescue LoadError + end + # Activate custom renderers app.register Middleman::Renderers::Sass app.register Middleman::Renderers::Markdown diff --git a/lib/middleman/renderers/markdown.rb b/lib/middleman/renderers/markdown.rb index 7c4899f0..bb0e0077 100644 --- a/lib/middleman/renderers/markdown.rb +++ b/lib/middleman/renderers/markdown.rb @@ -3,7 +3,13 @@ module Middleman::Renderers::Markdown def registered(app) app.send :include, InstanceMethods - app.set :markdown_engine, nil + begin + require "maruku" + app.set :markdown_engine, :maruku + rescue LoadError + app.set :markdown_engine, nil + end + app.set :markdown_engine_prefix, ::Tilt app.after_configuration do