diff --git a/middleman-core/lib/middleman-core/core_extensions/extensions.rb b/middleman-core/lib/middleman-core/core_extensions/extensions.rb index a9efd153..44d4b7d1 100644 --- a/middleman-core/lib/middleman-core/core_extensions/extensions.rb +++ b/middleman-core/lib/middleman-core/core_extensions/extensions.rb @@ -128,13 +128,6 @@ module Middleman # Search the root of the project for required files $LOAD_PATH.unshift(root) - # Check for and evaluate local configuration - local_config = File.join(root, "config.rb") - if File.exists? local_config - logger.debug "== Reading: Local config" - instance_eval File.read(local_config), local_config, 1 - end - if config[:autoload_sprockets] begin require "middleman-sprockets" @@ -143,6 +136,13 @@ module Middleman end end + # Check for and evaluate local configuration + local_config = File.join(root, "config.rb") + if File.exists? local_config + logger.debug "== Reading: Local config" + instance_eval File.read(local_config), local_config, 1 + end + run_hook :build_config if build? run_hook :development_config if development?