autoload slim and maruku
This commit is contained in:
parent
6f2522cea6
commit
8613a58896
2 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue