This commit is contained in:
Ben Hollis 2014-05-30 23:19:33 -07:00
parent cb2b13778e
commit 85cebdb7e9
5 changed files with 6 additions and 10 deletions

View file

@ -50,7 +50,6 @@ Middleman::Extensions.register :routing, auto_activate: :before_configuration do
Middleman::CoreExtensions::Routing
end
###
# Setup Optional Extensions
###

View file

@ -43,9 +43,7 @@ module Middleman::CoreExtensions
# TODO: Should we make people put these under "options" instead of having
# special known keys?
opts = fmdata.extract!(:layout, :layout_engine, :renderer_options, :directory_index, :content_type)
if opts.has_key?(:renderer_options)
opts[:renderer_options].symbolize_keys!
end
opts[:renderer_options].symbolize_keys! if opts.key?(:renderer_options)
ignored = fmdata.delete(:ignored)
@ -54,9 +52,6 @@ module Middleman::CoreExtensions
resource.add_metadata options: opts, page: fmdata
# TODO: resource.ignore! if ignored
# TODO: This doesn't really work because resources can't themselves be ignored / when
# an ignore rule is in place it's forever
resource.ignore! if ignored == true && !resource.proxy?
# TODO: Save new template here somewhere?
@ -84,8 +79,6 @@ module Middleman::CoreExtensions
data = external_data.deep_merge(data)
end
[data, content]
end
end

View file

@ -81,7 +81,9 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
# This is for backwards compatibility with the old provides_metadata-based code
# that used to be in this extension, but I don't know how much sense it makes.
#resource.add_metadata options: { lang: @mount_at_root }, locals: { lang: @mount_at_root }
unless resource.options[:lang]
resource.add_metadata options: { lang: @mount_at_root }, locals: { lang: @mount_at_root }
end
end
resources + new_resources

View file

@ -83,6 +83,7 @@ module Middleman
false
end
# rubocop:disable AccessorMethodName
def get_source_file
''
end

View file

@ -72,6 +72,7 @@ module Middleman
false
end
# rubocop:disable AccessorMethodName
def get_source_file
''
end