Merge pull request #1898 from ahazem/add-quiet-flag

This commit is contained in:
Parker Moore 2014-01-03 21:13:44 -08:00
commit 35948fa55c
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