Add Redcarpet YAML support
This commit is contained in:
parent
81abcbc15b
commit
daf217567f
|
@ -7,10 +7,20 @@ module Middleman::CoreExtensions::FrontMatter
|
||||||
app.extend ClassMethods
|
app.extend ClassMethods
|
||||||
|
|
||||||
::Tilt::register RDiscountTemplate, 'markdown', 'mkd', 'md'
|
::Tilt::register RDiscountTemplate, 'markdown', 'mkd', 'md'
|
||||||
|
::Tilt::register RedcarpetTemplate, 'markdown', 'mkd', 'md'
|
||||||
|
::Tilt.prefer(RDiscountTemplate)
|
||||||
|
|
||||||
::Tilt::register RedClothTemplate, 'textile'
|
::Tilt::register RedClothTemplate, 'textile'
|
||||||
|
::Tilt.prefer(RedClothTemplate)
|
||||||
|
|
||||||
::Tilt::register ERBTemplate, 'erb', 'rhtml'
|
::Tilt::register ERBTemplate, 'erb', 'rhtml'
|
||||||
|
::Tilt.prefer(ERBTemplate)
|
||||||
|
|
||||||
::Tilt::register SlimTemplate, 'slim'
|
::Tilt::register SlimTemplate, 'slim'
|
||||||
|
::Tilt.prefer(SlimTemplate)
|
||||||
|
|
||||||
::Tilt::register HamlTemplate, 'haml'
|
::Tilt::register HamlTemplate, 'haml'
|
||||||
|
::Tilt.prefer(HamlTemplate)
|
||||||
|
|
||||||
app.before do
|
app.before do
|
||||||
result = resolve_template(request.path_info, :raise_exceptions => false)
|
result = resolve_template(request.path_info, :raise_exceptions => false)
|
||||||
|
@ -64,6 +74,9 @@ module Middleman::CoreExtensions::FrontMatter
|
||||||
class RDiscountTemplate < ::Tilt::RDiscountTemplate
|
class RDiscountTemplate < ::Tilt::RDiscountTemplate
|
||||||
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
||||||
end
|
end
|
||||||
|
class RedcarpetTemplate < ::Tilt::RedcarpetTemplate
|
||||||
|
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
||||||
|
end
|
||||||
|
|
||||||
class RedClothTemplate < ::Tilt::RedClothTemplate
|
class RedClothTemplate < ::Tilt::RedClothTemplate
|
||||||
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
||||||
|
|
Loading…
Reference in a new issue