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 Middleman::CoreExtensions::Routing
end end
### ###
# Setup Optional Extensions # Setup Optional Extensions
### ###

View file

@ -43,9 +43,7 @@ module Middleman::CoreExtensions
# TODO: Should we make people put these under "options" instead of having # TODO: Should we make people put these under "options" instead of having
# special known keys? # special known keys?
opts = fmdata.extract!(:layout, :layout_engine, :renderer_options, :directory_index, :content_type) opts = fmdata.extract!(:layout, :layout_engine, :renderer_options, :directory_index, :content_type)
if opts.has_key?(:renderer_options) opts[:renderer_options].symbolize_keys! if opts.key?(:renderer_options)
opts[:renderer_options].symbolize_keys!
end
ignored = fmdata.delete(:ignored) ignored = fmdata.delete(:ignored)
@ -54,9 +52,6 @@ module Middleman::CoreExtensions
resource.add_metadata options: opts, page: fmdata 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? resource.ignore! if ignored == true && !resource.proxy?
# TODO: Save new template here somewhere? # TODO: Save new template here somewhere?
@ -84,8 +79,6 @@ module Middleman::CoreExtensions
data = external_data.deep_merge(data) data = external_data.deep_merge(data)
end end
[data, content] [data, content]
end end
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 # 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. # 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 end
resources + new_resources resources + new_resources

View file

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

View file

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