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
|
module Middleman::CoreExtensions::Rendering
|
||||||
class << self
|
class << self
|
||||||
def registered(app)
|
def registered(app)
|
||||||
|
# Autoload
|
||||||
require "coffee_script"
|
require "coffee_script"
|
||||||
|
|
||||||
|
begin
|
||||||
|
require "slim"
|
||||||
|
rescue LoadError
|
||||||
|
end
|
||||||
|
|
||||||
# Activate custom renderers
|
# Activate custom renderers
|
||||||
app.register Middleman::Renderers::Sass
|
app.register Middleman::Renderers::Sass
|
||||||
app.register Middleman::Renderers::Markdown
|
app.register Middleman::Renderers::Markdown
|
||||||
|
|
|
@ -3,7 +3,13 @@ module Middleman::Renderers::Markdown
|
||||||
def registered(app)
|
def registered(app)
|
||||||
app.send :include, InstanceMethods
|
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.set :markdown_engine_prefix, ::Tilt
|
||||||
|
|
||||||
app.after_configuration do
|
app.after_configuration do
|
||||||
|
|
Loading…
Reference in a new issue