Class: Middleman::Cli::Sitemap
- Inherits:
-
Thor
- Object
- Thor
- Middleman::Cli::Sitemap
- Includes:
- Thor::Actions
- Defined in:
- lib/middleman-sitemap/commands.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
17 18 19 |
# File 'lib/middleman-sitemap/commands.rb', line 17 def self.exit_on_failure? true end |
.source_root ⇒ Object
13 14 15 |
# File 'lib/middleman-sitemap/commands.rb', line 13 def self.source_root ENV['MM_ROOT'] end |
Instance Method Details
#build ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/middleman-sitemap/commands.rb', line 29 def build shared_instance = ::Middleman::Application.server.inst if shared_instance.respond_to? :sitemap # Override options based on what was passed on the command line shared_instance..gzip = [:gzip] if [:gzip] shared_instance..hostname = [:hostname] if [:hostname] shared_instance.generate_sitemap else raise Thor::Error.new "You need to activate the sitemap extension in config.rb" end end |