Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix auto-generation #899

Closed
wants to merge 1 commit into from

5 participants

@AlexanderEkdahl

This fixes the issue with auto-generation triggering only on files in source directory and not subfolders.

Seeing how there have been multiple issues with auto-generation the last couple of weeks I would very much like this to be tested thoroughly before introducing a new bug.

@mattr-
Owner

:+1:

@jwebcat

Would love to see this merged as Jekyll 1.0.0.beta2 starts acting crazy and gets stuck in a regeneration loop with the --watch flag on Windows 7.

I have switched to using rake, grunt, and live reload
watch and regenerate.

@mattr- I would love your feedback on this. Here is my repo https://github.com/jwebcat/rake-jekyll-grunt.git

  • it is basically the rake file from octopress with some extra goodies for jekyll
@maul-esel

Not sure, but it seems this contradicts PR #883 which prevents usage of directory_watcher >= 1.5.

@AlexanderEkdahl

I am aware of that PR. But maybe that issue was fixed in directory_watcher 1.5.1?

I'm going to investigate further because this auto-regeneration insanity really needs to be fixed!

@maul-esel

The mentioned PR references TwP/directory_watcher#22:

1.5.1 doesn't work on Ubuntu

Judging from this issue, it doesn't seem to be fixed now either.

@parkr
Owner

We're going to sit on this until 1.5.1 is fixed.

@AlexanderEkdahl
@parkr
Owner

I'll close until we have a solution.

@parkr parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2013
  1. @AlexanderEkdahl

    Fix auto-generation

    AlexanderEkdahl authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 3 deletions.
  1. +1 −1  jekyll.gemspec
  2. +1 −2  lib/jekyll/commands/build.rb
View
2  jekyll.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('liquid', "~> 2.3")
s.add_runtime_dependency('classifier', "~> 1.3")
- s.add_runtime_dependency('directory_watcher', "~> 1.4.1")
+ s.add_runtime_dependency('directory_watcher', "~> 1.5.1")
s.add_runtime_dependency('maruku', "~> 0.5")
s.add_runtime_dependency('kramdown', "~> 0.14")
s.add_runtime_dependency('pygments.rb', "~> 0.3.2")
View
3  lib/jekyll/commands/build.rb
@@ -51,9 +51,8 @@ def self.watch(site, options)
puts " Destination: #{destination}"
puts " Auto-regeneration: enabled"
- dw = DirectoryWatcher.new(source)
+ dw = DirectoryWatcher.new('.', :glob => self.globs(source, destination), :pre_load => true)
dw.interval = 1
- dw.glob = self.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.