Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

exclude destination from auto watch folders #676

Closed
wants to merge 1 commit into from

3 participants

@hpyhacking

No description provided.

@tafkey tafkey referenced this pull request from a commit in tafkey/jekyll
@tafkey tafkey Added support for ignoring certain directories (when auto=true).
See also ticket #676.
a5796de
@jana4u

+1 it is unusable with auto=true atm

@parkr
Owner

I want to merge this in - please rebase on the current master!

@parkr
Owner

Fixed in #820.

@parkr parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 15, 2012
  1. exclude destination from auto watch directory

    hpyhacking authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 bin/jekyll
View
6 bin/jekyll
@@ -225,10 +225,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 -= ['_site', destination]
dirs = dirs.map { |x| "#{x}/**/*" }
dirs += ['*']
end
@@ -245,7 +245,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")
Something went wrong with that request. Please try again.