Change the auto activated extension feature to allow specifying different lifecycle events to activate at, allowing more extensions to auto activate.

This commit is contained in:
Ben Hollis 2014-05-25 21:06:25 -07:00
parent 70b3b87905
commit 6561fea296
5 changed files with 48 additions and 38 deletions

View file

@ -179,11 +179,9 @@ module Middleman
# Setup the default values from calls to set before initialization
self.class.config.load_settings(self.class.superclass.config.all_settings)
# Parse YAML from templates. Must be before sitemap so sitemap
# extensions see updated frontmatter!
activate :front_matter
activate :data
activate :file_watcher
::Middleman::Extensions.auto_activate[:before_sitemap].each do |ext_name|
activate ext_name
end
# Initialize the Sitemap
@sitemap = ::Middleman::Sitemap::Store.new(self)