Add --quiet flag

This commit is contained in:
Ahmed Hazem 2014-01-01 18:50:27 +02:00
parent 012387396a
commit fdcf1f4526
2 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,7 @@ def add_build_options(c)
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild' c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
c.option 'lsi', '--lsi', 'Use LSI for improved related posts' c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder' c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
c.option 'quiet', '-q', '--quiet', 'Silence output.'
c.option 'verbose', '-V', '--verbose', 'Print verbose output.' c.option 'verbose', '-V', '--verbose', 'Print verbose output.'
end end

View File

@ -4,6 +4,8 @@ module Jekyll
def self.process(options) def self.process(options)
site = Jekyll::Site.new(options) site = Jekyll::Site.new(options)
Jekyll.logger.log_level = Jekyll::Stevenson::ERROR if options['quiet']
self.build(site, options) self.build(site, options)
self.watch(site, options) if options['watch'] self.watch(site, options) if options['watch']
end end