mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Merge pull request #2165 from Zequez/master
This commit is contained in:
@@ -67,6 +67,7 @@ module Jekyll
|
||||
c.option 'future', '--future', 'Publishes posts with a future date'
|
||||
c.option 'limit_posts', '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
|
||||
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
|
||||
c.option 'force_polling', '--force_polling', 'Force watch to use polling'
|
||||
c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
|
||||
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
|
||||
c.option 'quiet', '-q', '--quiet', 'Silence output.'
|
||||
|
||||
@@ -69,7 +69,11 @@ module Jekyll
|
||||
|
||||
Jekyll.logger.info "Auto-regeneration:", "enabled"
|
||||
|
||||
listener = Listen.to(source, :ignore => ignored) do |modified, added, removed|
|
||||
listener = Listen.to(
|
||||
source,
|
||||
:ignore => ignored,
|
||||
:force_polling => options['force_polling']
|
||||
) do |modified, added, removed|
|
||||
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
||||
n = modified.length + added.length + removed.length
|
||||
print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "
|
||||
|
||||
Reference in New Issue
Block a user