Allow skipping sitemap. Helps #1837
This commit is contained in:
parent
7484c9f242
commit
5337d0640b
|
@ -47,6 +47,8 @@ end
|
|||
::Middleman::Logger.singleton(3)
|
||||
::Middleman::Cli.config = ::Middleman::Application.new do
|
||||
config[:exit_before_ready] = true
|
||||
config[:watcher_disable] = true
|
||||
config[:disable_sitemap] = true
|
||||
end.config
|
||||
|
||||
# Require the Middleman version
|
||||
|
|
|
@ -23,6 +23,8 @@ module Middleman::Cli
|
|||
::Middleman::Logger.singleton(2, false)
|
||||
|
||||
app = ::Middleman::Application.new do
|
||||
config[:disable_sitemap] = true
|
||||
config[:watcher_disable] = true
|
||||
config[:exit_before_ready] = true
|
||||
config[:environment] = opts[:environment].to_sym if opts[:environment]
|
||||
end
|
||||
|
|
|
@ -96,6 +96,10 @@ module Middleman
|
|||
# @return [String]
|
||||
define_setting :source, 'source', 'Name of the source directory'
|
||||
|
||||
# If we should not run the sitemap.
|
||||
# @return [Boolean]
|
||||
define_setting :disable_sitemap, false, 'If we should not run the sitemap.'
|
||||
|
||||
# If we should exit before ready event.
|
||||
# @return [Boolean]
|
||||
define_setting :exit_before_ready, false, 'If we should exit before ready event.'
|
||||
|
|
|
@ -216,6 +216,8 @@ module Middleman
|
|||
# rebuild_resource_list! since the last time it was run. This is
|
||||
# very expensive!
|
||||
def ensure_resource_list_updated!
|
||||
return if @app.config[:disable_sitemap]
|
||||
|
||||
@lock.synchronize do
|
||||
return unless @needs_sitemap_rebuild
|
||||
|
||||
|
|
Loading…
Reference in a new issue