From cb336dbb71dfd5ae45f918df64c0f85cb25193f1 Mon Sep 17 00:00:00 2001 From: Charles Stuart Date: Tue, 20 Mar 2012 13:58:32 -0600 Subject: [PATCH] fix issue 457: Custom destination in _config.yml causes jekyll server to auto-regenerate continuously --- bin/jekyll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/jekyll b/bin/jekyll index 28193a91..0e6e606f 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -215,10 +215,10 @@ source = options['source'] destination = options['destination'] # Files to watch -def globs(source) +def globs(source, destination) Dir.chdir(source) do dirs = Dir['*'].select { |x| File.directory?(x) } - dirs -= ['_site'] + dirs -= [destination] dirs = dirs.map { |x| "#{x}/**/*" } dirs += ['*'] end @@ -235,7 +235,7 @@ if options['auto'] dw = DirectoryWatcher.new(source) dw.interval = 1 - dw.glob = globs(source) + dw.glob = globs(source, destination) dw.add_observer do |*args| t = Time.now.strftime("%Y-%m-%d %H:%M:%S")