Git Product home page Git Product logo

jekyll-watch's Introduction

Jekyll Watch

Rebuild your Jekyll site when a file changes with the --watch switch.

Linux Build Status Windows Build status

Installation

jekyll-watch comes pre-installed with Jekyll 2.1 or greater.

Add this line to your application's Gemfile:

gem 'jekyll-watch'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-watch

Usage

Pass the --watch flag to jekyll build or jekyll serve:

$ jekyll build --watch
$ jekyll serve --watch # this flag is the default, so no need to specify it here for the 'serve' command

The --watch flag can be used in combination with any other flags for those two commands, except --detach for the serve command.

Contributing

  1. Fork it ( https://github.com/jekyll/jekyll-watch/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

jekyll-watch's People

Contributors

ashmaroli avatar dirtyf avatar e2 avatar envygeeks avatar jekyllbot avatar luckycoder1030 avatar mojavelinux avatar parkr avatar pluehne avatar stkao05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-watch's Issues

Suggested integration with listen-compat

I just released https://github.com/guard/listen-compat and I'd like some feedback.

Listen has had a lot of incompatibility issues in the past - which forced other gem maintainers to adapt their gems to those changes. (And this includes lots of workarounds which have nothing to do with API changes).

So I created listen-compat to address this, because some gems/apps simply need to "watch for changes" and nothing else.

While nowadays I try to make Listen as "compatible as possible" (even keeping useless methods "just in case someone is using it"), it's sometimes impossible to even fix a few bugs without breaking something some app using Listen in some unexpected (or even expected) way.

Here are the benefits of switching from Listen to Listen-compat:

  1. Guaranteed API forever - working with any version of listen installed (especially valuable if people run gems without Bundler)
  2. Guaranteed to include any needed workarounds for buggy Listen versions (now and in the future)
  3. Minimal interface to run indefinitely until Ctrl-C is pressed (without worrying about cleanup, threads)
  4. Planned: possible for users to configure and change Listen implementations - without requiring gem authors to even know about this (pending idea: configuration files for Listen or environment variables)
  5. Lots of conveniences and sanity checking, so you can use Strings or Pathnames as you wish, and it shouldn't matter
  6. Helper for making VERY simple unit tests - so you get full code coverage, with fast isolated tests which accurately simulate the real thing
  7. Informative warnings to users who are using an old versions of Listen or bad setups unknown at the time of release.
  8. You don't need a dependency on Listen or worry about which version to use - you just need a dependency on listen-compat (though, of course, the users has to get Listen from somewhere)

Let me know what you think - feature requests and pull requests are more than welcome.

Glob support

Jekyll's site.exclude supports globs, but it seems that jekyll-watch doesn't.
In jekyll/jekyll#3913 this plugin should use EntryFilter, that's likely the problem here as well.

I'm developing my site in IDEA and this doesn't work with watch (but those files don't show up in _site):

exclude:
  - `*.iws`
  - '*.ipr'

Symlinking the _posts directory

I've created a folder in Dropbox to contain all the posts, and have:

~/Dropbox/Posts/Category1
~/Dropbox/Posts/Category2
...

I've linked using ln -s ~/Dropbox/Posts/Category1 ./_posts or ~/Dropbox/Posts/Category1 ./Category1/_posts from the Jekyll directory.

Jekyll serve does parse everything the first time, but then does not regenerate when new posts are added to ~/Dropbox/Posts/Category1.

Tested with current and pre. OSX 10.11 Beta 15A243d

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v2.2.1.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

2.1 error when making changes

After updating to version 2.1.0 ('bundle update'), changing any file resulted in an error as you can see below. Downgrading to 2.0.0 works for me.

❯ bundle exec jekyll serve
Configuration file: /Users/yatil/Library/Mobile Documents/com~apple~CloudDocs/projects/wai-about-wai/_config.yml
            Source: /Users/yatil/Library/Mobile Documents/com~apple~CloudDocs/projects/wai-about-wai
       Destination: /Users/yatil/Library/Mobile Documents/com~apple~CloudDocs/projects/wai-about-wai/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
      Remote Theme: Using theme w3c/wai-website-theme
                    done in 3.132 seconds.
 Auto-regeneration: enabled for '/Users/yatil/Library/Mobile Documents/com~apple~CloudDocs/projects/wai-about-wai'
    Server address: http://127.0.0.1:4000/wai-about-wai/
  Server running... press ctrl-c to stop.
      Regenerating: 1 file(s) changed at 2018-10-10 12:37:21
E, [2018-10-10T12:37:21.434728 #51330] ERROR -- : exception while processing events: undefined local variable or method `source_path' for Jekyll::Watcher:Module Backtrace:
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:63:in `block (2 levels) in listen_handler'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:63:in `each'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:63:in `block in listen_handler'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/config.rb:23:in `call'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/processor.rb:115:in `_process_changes'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/processor.rb:19:in `block in loop_for'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/processor.rb:15:in `loop'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/processor.rb:15:in `loop_for'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/loop.rb:84:in `_wait_for_changes'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/event/loop.rb:42:in `block in setup'
 -- /Users/yatil/.rvm/gems/ruby-2.4.1/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb:6:in `block in add'

jekyll-watch requires Ruby version >= 2.4.0

When following the instructions to install Jekyll on Debian 9.8, I get the following error:

jekyll-watch requires Ruby version >= 2.4.0.

Checking the Ruby version:

$ ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]

Then running

$ gem install jekyll-watch
ERROR:  Error installing jekyll-watch:
        The last version of jekyll-watch (>= 0) to support your Ruby & RubyGems was 2.1.2. Try installing it with `gem install jekyll-watch -v 2.1.2`
        jekyll-watch requires Ruby version >= 2.4.0. The current ruby version is 2.3.3.222.

Installation instructions for Jekyll should include details with regards to incompatibility with the new version of jekyll-watch.

Running gem install jekyll-watch -v 2.1.2 solves the problem, but this is not appropriate on the long run.

Printing what triggered the regeneration

I've been using Jekyll with this local hack in watch.rb:

removed.each { |file| Jekyll.logger.info("Changes:", "Removed #{file.slice(site.source.length + 1, file.length)}"); }
added.each { |file| Jekyll.logger.info("Changes:", "Added #{file.slice(site.source.length + 1, file.length)}"); }
modified.each { |file| Jekyll.logger.info("Changes:", "Modified #{file.slice(site.source.length + 1, file.length)}"); }
print Jekyll.logger.message("Regenerating:", "#{n} file#{n>1?"s":""} changed at #{t.strftime("%Y-%m-%d %H:%M:%S")} ")

for almost a year now, and so far the results have been great. It doesn't print much, you can see why it happened cleanly and most of the time there isn't many changes so it's intrusive.

How do you feel about integrating this?

Update dependency constraint to allow for bundler v2.0.0

Hey there! 👋

I noticed that the constraint you have for bundler doesn't allow for the latest version to be used.

The constraint I found was ~> 1.15, and the latest version available is 2.0.0.

Can you look into updating that constraint so our users can use the latest and greatest version? Thanks! 💞

Changes being made to CSS file not being seen by Jekyll Serve (watch)

I'm using Gulp 4 to build some Scss files and output a CSS file. The problem I'm having is that when an updated CSS file gets output by Gulp and changes have been made those changes are not being caught by jekyll serve so they are being left out of the build.

I've setup a repo to demonstrate the issue I'm having: https://github.com/sebnitu/starter-jekyll

I've stripped out as much as I could from this example. The only packages I'm using to create this issue are the latest versions of gulp, gulp-sass and Jekyll. I've narrowed this down to the watch component because the styles.css file does get output correctly on the initial build, but not getting triggered on further changes to that css file via Gulp.

Ignore source directories not using underscore prefix

Jekyll --watch treats source directories that do not use an underscore prefix as static. Take the following directory structure:

├── data
├── collections
├── includes
├── layouts
├── pages
└── config.yml

A directory structure like this would require developers to use the following settings:

data_dir: data
collections_dir: collections
includes_dir: includes
layouts_dir: layouts

Because these directories are not using an underscore or dot they be will treated as static so when running a Jekyll build to prevent these directories from ending up in the destination directory, we exclude them:

exclude:
- data
- collections
- includes
- layouts

If we were to run jekyll build --config config.yml on this config it would generate the desired result by ignoring the listed excludes and respecting the source directory paths. If we were to run it with watch --watch the excludes will be ignored because --watch ignores the excludes (logically) – but why does --watch ignore source directory paths?

Can we prevent custom source directories from being ignored by watch?

Update

This can be achieved by overwriting custom_excludes which seems hacky af, but works. It would be great if custom source directories were ignored by default as they are with build instead of having to add this extra layer.

require 'jekyll-watch'

# Override custom excludes
module Jekyll
  module Watcher
    def custom_excludes(options)
      if options['watch_exclude'] then
        Array(options['exclude']).map { |directory|
          unless options['watch_exclude'].include? directory then
            Jekyll.sanitized_path(options['source'], directory)
          end
        }.compact
      end
    end
  end
end

Then in config.yml

watch_exclude:
  - collections
  - includes
  - data
  - layouts

Forking Jekyll leaves unterminated celluloid actors

Alright, this is a bizarre problem for a ridiculous use case, so I apologize in advance if there is no easy solution to this.

Jekyll uses Jekyll-watch to check for changes to files when rebuilding. Jekyll-watch uses the listen gem, which in turn uses celluloid in some manner. Celluloid is used to provide asynchronous processes to listen in some manner.

My problem: I am writing a multi-language Jekyll plugin that needs to call site.process in different forks. Each fork is meant to build the site in a different language. We have a large website being built with Jekyll with enough multi-language content that considerable time is saved making multiple forks in this location in jekyll site.

Effectively the plugin code looks like:

module Jekyll
class site
...
alias_method :process_orig, :process
    def process
      prepare
      pids = {}
      languages.each do |lang|
        pids[lang] = fork do
          process_language lang #calls process_orig 
        end
      end
      languages.each do |lang|
        waitpid(pids[lang])
      end
    end

The site builds correctly the first time it runs. Subsequent builds work correctly as well, but they all throw a loud error from celluloid:

E, [2015-09-20T16:52:27.461625 #12191] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
E, [2015-09-20T16:52:27.503944 #12194] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
E, [2015-09-20T16:52:27.566674 #12197] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
E, [2015-09-20T16:52:27.652780 #12188] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!

It throws one of these errors for every fork. These celluloid errors are loud, and are actually adding 10 additional (asynchronous) seconds to site.process build.

My question: Is there any way to preemptively terminate celluloid actors from Jekyll Site? If so, I can terminate these actors preemptively from each fork, and prevent these loud errors from celluloid.

Thank you for your help.

Reload plugins when changes are detected in _plugins folder.

Moved from jekyll/jekyll#4774.

When using jekyll --serve, changes in the _plugins folder are detected and the site files are regenerated, but it would be helpful if changed plugin files were reloaded prior to regeneration. This option would probably be mutually exclusive with --incremental.

There are alternatives like the gulp task described here, but direct support would be nice.

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v2.0.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

Excluded directories are still watched

_Note:_ I created this issue based on the results of a Jekyll Talk discussion and consistently being able to recreate the error described below using this Jekyll project.

I'm using Jekyll 3.1.1 to generate a blog and I recently introduced a Git hook to automatically publish changes pre-push.

After introducing this hook, I have started getting the following error when I run jekyll serve:

Configuration file: /Users/egillespie/Projects/blog.givingjar.org/_config.yml
            Source: /Users/egillespie/Projects/blog.givingjar.org
       Destination: /Users/egillespie/Projects/blog.givingjar.org/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.223 seconds.
        ** ERROR: directory is already being watched! **

        Directory: /Users/egillespie/Projects/blog.givingjar.org/node_modules/git-scripts/bin/hooks

        is already being watched through: /Users/egillespie/Projects/blog.givingjar.org/node_modules/git-scripts/bin/hooks

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
 Auto-regeneration: enabled for '/Users/egillespie/Projects/blog.givingjar.org'
Configuration file: /Users/egillespie/Projects/blog.givingjar.org/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

I am excluding node_modules in _config.yml:

exclude:
  - Gemfile
  - Gemfile.lock
  - LICENSE
  - README.md
  - package.json
  - Gruntfile.js
  - node_modules

node_modules is correctly being excluded from building (i.e. there is no node_modules subdirectory in _site).

I'm also excluding node_modules in .gitignore:

# project
node_modules
_site*
.sass-cache
.jekyll-metadata

# general
.DS_Store
Thumbs.db
ehthumbs.db

Based on this GitHub issue and this commit it seems like node_modules should be excluded from the watch, but it's not.

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v1.5.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

Support Listen 3.x

Listen 3.x is a major rewrite, and among other things greatly reduces CPU usage and should be a lot more responsive - especially in the worst case scenarios (should make web designers much happier).

Here are the release notes: https://github.com/guard/listen/releases/tag/v3.0.0

(Neither the API differences nor the lack of TCP in Listen 3.x affect Jekyll::Watch at all).

Generally, Listen 3.x is the primary version, and Listen 2.x is discouraged.

So it's best if you lock to Listen ~> 3.0.

While you can just lock to: '>= 2.10.1', '< 4.0.0', I'm sure users will appreciate if 2.x is no longer possible to use with the latest jekyll-watch version.

Report/forward issues to https://github.com/guard/listen as usual.

Release 2.0

Time to cut a new gem after #50

  • Drop Support for Jekyll 2.x

jekyll-watch on Windows

The following if block doesn't seem to be in-effect when the gem is cut on a non-Windows system:

  require 'rbconfig'
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
    spec.add_runtime_dependency "wdm", "~> 0.1.0"
  end

This following is an excerpt from the spec file of the installed gem on my Windows machine:

    if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
      s.add_runtime_dependency(%q<listen>.freeze, ["< 3.1", "~> 3.0"])
      s.add_development_dependency(%q<bundler>.freeze, ["~> 1.6"])
      s.add_development_dependency(%q<rubocop>.freeze, ["~> 0.35.1"])
      s.add_development_dependency(%q<rake>.freeze, [">= 0"])
      s.add_development_dependency(%q<rspec>.freeze, ["~> 3.0"])
      s.add_development_dependency(%q<jekyll>.freeze, [">= 2.0"])
    else
      s.add_dependency(%q<listen>.freeze, ["< 3.1", "~> 3.0"])
      s.add_dependency(%q<bundler>.freeze, ["~> 1.6"])
      s.add_dependency(%q<rubocop>.freeze, ["~> 0.35.1"])
      s.add_dependency(%q<rake>.freeze, [">= 0"])
      s.add_dependency(%q<rspec>.freeze, ["~> 3.0"])
      s.add_dependency(%q<jekyll>.freeze, [">= 2.0"])
    end

The same excerpt after installing a newly cut jekyll-watch gem, cut on Windows machine:

    if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
      s.add_runtime_dependency(%q<listen>.freeze, ["< 3.1", "~> 3.0"])
+     s.add_runtime_dependency(%q<wdm>.freeze, ["~> 0.1.0"])
      s.add_development_dependency(%q<bundler>.freeze, ["~> 1.6"])
      s.add_development_dependency(%q<rubocop>.freeze, ["~> 0.35.1"])
      s.add_development_dependency(%q<rake>.freeze, [">= 0"])
      s.add_development_dependency(%q<rspec>.freeze, ["~> 3.0"])
      s.add_development_dependency(%q<jekyll>.freeze, [">= 2.0"])
    else
      s.add_dependency(%q<listen>.freeze, ["< 3.1", "~> 3.0"])
+     s.add_dependency(%q<wdm>.freeze, ["~> 0.1.0"])
      s.add_dependency(%q<bundler>.freeze, ["~> 1.6"])
      s.add_dependency(%q<rubocop>.freeze, ["~> 0.35.1"])
      s.add_dependency(%q<rake>.freeze, [">= 0"])
      s.add_dependency(%q<rspec>.freeze, ["~> 3.0"])
      s.add_dependency(%q<jekyll>.freeze, [">= 2.0"])
    end

Not that its really an issue, just pointing it out..
This gem nevertheless works, as intended, on Windows, even with the above difference and not including the gem 'wdm' in the site's Gemfile.

Ignore all config files

In fc96142 you ignored _config.xxx, but I think the file name should be expanded to: _config*.xxx.

Reason being that I need some special settings when developing (mostly to make compilation faster by ignoring boilerplate like header/footer), and I have these files:

_config.yml
_config_dev.yml
_config_local.yml

and use --config _config.yml,_config_local.yml,_config_dev.yml to launch jekyll serve.

For a moment I thought that reading the value of --config would be also a good idea, but it's not because then if I launch with --config _config.yml,_config_local.yml and modify _config_dev the site would be still regenerated.

Rebuild site on config changes

If I run jekyll serve --watch the site does not seem to rebuild when a configuration file (_config.yml) changes.

Ideally --watch could watch config files too.

Symlinks, again

Since I can't reopen #20, I thought I'd open a new issue. We've hit that problem ourselves (we have a symlink for the pages folder) and though we've been able to work around it by using the code in https://github.com/willnorris/willnorris.com/blob/492bc19fd9e47380dbd929e5ac7903476de07e07/src/_plugins/symlink_watcher.rb, it would be really nice to not have to install a plugin to do that.

I understand resources are limited, and you can't support every setup under the sun, so a "nope, keep using a plugin" is fine 😄 But I thought I'd ask in case this is something other people need.

How can I get jekyll to watch an excluded directory?

For the Morea Framework (http://morea-framework.github.io/), I have written a Jekyll plugin to specially process a subdirectory, and so I exclude this directory in my config.yml. Up until recently, the --watch command did the "right thing", in that I could make changes to my excluded subdirectory and Jekyll would regenerate upon the change (which would re-invoke my plugin).

This stopped working, and I've hunted around until I discovered this plugin (apparently as of Jekyll 2.1) in which the watcher doesn't watch excluded files/directories.

I get that this makes a lot of sense for a lot of use cases, but unfortunately it is bad for my use case.

I would like your guidance on the best way to re-enable "watching" on directories that are excluded from other Jekyll processing. Thanks!

feat: excluded files should not cause a site rebuild

Summary

If a file is on the exclude list (including a default Jekyll-level exclusion of dotfiles), any change to these files should not cause a site rebuild.

Motivation

If a file is excluded, it has no chance of landing in the target directory. We should therefore not auto-rebuild based on a change in this file.

Update dependency constraint to allow for bundler v2.0.1

Hey there! 👋

I noticed that the constraint you have for bundler doesn't allow for the latest version to be used.

The constraint I found was ~> 1.15, and the latest version available is 2.0.1.

Can you look into updating that constraint so our users can use the latest and greatest version? Thanks! 💞

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v2.1.2.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

Listen ignore paths unexpectedly match subdirectories

Per the Jekyll docs, paths specified in the exclude setting "are relative to the site's source directory," so adding lib/ to the excluded paths will exclude ./lib but not ./another/path/containing/lib. This works as expected in Jekyll itself, but not when running jekyll serve, because the regex defined in Watcher#listen_ignore_paths ends up matching any lib.

I'm pretty sure the fix is just changing listen_ignore_paths to anchor the pattern to the front of the string, e.g. Regexp.new(/^#{Regexp.escape(relative_path)}/), but I'm not sure if there might be unintended side effects.

watch ignores all folders matching anything in exclude:, too aggressive

Watch's pattern match for rejecting file changes is too aggressive. For example ...

exclude:

  • spec
  • README.md

will cause watch to ignore any changes in any folder including the string 'spec' in its name. That is, if you have a page in articles/2014-12-22-rspec-1/article.md, watch will not regenerate on changes to article.md.

If you force regeneration, Jekyll will process that file appropriately, but watch will not trigger if you change the file.

bug: no watch with accents in root folder

macOS 10.13.6
Ruby 2.5.1
jekyll-watch 2.1.0
Given that I create a new Jekyll website `testé-çasésûr`
When I launch bundle exec jekyll serve and modify a file
Then local preview is not updated
And  I get the following error:
➜ jekyll new testé-çasésûr!
...
New jekyll site installed in /Users/frank/code/jekyll/tests/testé-çasésûr!.

➜ cd testé-çasésûr\!

jekyll/tests/testé-çasésûr!

jekyll/tests/testé-çasésûr!
➜ bundle exec jekyll serve
Configuration file: /Users/frank/code/jekyll/tests/testé-çasésûr!/_config.yml
            Source: /Users/frank/code/jekyll/tests/testé-çasésûr!
       Destination: /Users/frank/code/jekyll/tests/testé-çasésûr!/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.876 seconds.
 Auto-regeneration: enabled for '/Users/frank/code/jekyll/tests/testé-çasésûr!'
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
E, [2018-10-10T10:31:01.223476 #4683] ERROR -- : exception while processing events: "\xC3" from ASCII-8BIT to UTF-8 Backtrace:
 -- /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:69:in `encode!'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:69:in `block in normalize_encoding'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:69:in `map'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:69:in `normalize_encoding'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-watch-2.1.0/lib/jekyll/watcher.rb:57:in `block in listen_handler'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/config.rb:23:in `call'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/processor.rb:115:in `_process_changes'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/processor.rb:19:in `block in loop_for'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/processor.rb:15:in `loop'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/processor.rb:15:in `loop_for'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/loop.rb:84:in `_wait_for_changes'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/event/loop.rb:42:in `block in setup'
 -- /usr/local/lib/ruby/gems/2.5.0/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb:6:in `block in add'

/cc @jekyll/core

Appease Rubocop

🆕🐥☝ First Timers Only.

This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

About First Timers Only.

🎃💻👕 Hacktoberfest: Trick or Treat!

If you haven’t yet, sign up for Hacktoberfest to earn an exclusive T-Shirt. Plus I’m sure we can teach you a cool trick or two in the process

🤔 What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

📋 Step by Step

  • 🙋 Claim this issue: Comment below.

    Once claimed we add you as contributor to this repository.

  • 👌 Accept our invitation to this repository. Once accepted, assign yourself to this issue

  • 📝 Update the file jekyll-watch.gemspec in the jekyll-watch repository (press the little pen Icon) and edit the line as shown below.

@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
   end
 
   spec.add_development_dependency "bundler", "~> 1.15"
-  spec.add_development_dependency "rubocop", "~> 0.5"
+  spec.add_development_dependency "jekyll", ENV["JEKYLL_VERSION"] ? "~> #{ENV["JEKYLL_VERSION"]}" : ">= 2.0"
   spec.add_development_dependency "rake"
   spec.add_development_dependency "rspec", "~> 3.0"
-  spec.add_development_dependency "jekyll", ENV["JEKYLL_VERSION"] ? "~> #{ENV["JEKYLL_VERSION"]}" : ">= 2.0"
+  spec.add_development_dependency "rubocop", "~> 0.5"
 end
  • 💾 Commit your changes

  • 🔀 Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can edit files directly in your browser

  • 🏁 Done Ask in comments for a review :)

🤔❓ Questions

Leave a comment below!

This issue was created by First-Timers-Bot.

Changes to files starting with _site are not being picked up

I noticed that changes to files starting with _site are not being picked up by Jekyll when using jekyll s. Namely, I have the following file names. When I save one of them, the changes are not being picked up by Jekyll.

  • _sass/_site-head.scss
  • _sass/_site-logo.scss
  • _sass/_site-nav.scss
  • _includes/_site-head.html

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v2.0.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

When run inside a docker container file changes are not detected

If jekyll serve is called from within a docker container but the files are mapped from the host filesystem (i.e. OS X in my case) then no regeneration occurs when a file is changed. ls -al in the container shows the timestamp has changed on the file so the changes are making it through.

ignore doesn't accept wildcards?

This is in part related to issue 7888 on the official jekyll repo.

Right now I've got an exclude section in my yaml like the following:

exclude:
  - node_modules/
  - vendor/
  - assets/ascii/*.md
  - assets/gpg/*.private.gpg
  - "*.rb"
  - "**/.#*"

The really annoying part here is that unless an absolute path for these entries exist, jekyll-watch doesn't include them in the list of paths to be ignored. see here for what I mean. Meaning even if jekyll itself won't output a hello.rb file to the build directory, jekyll-watch will rebuild the site because a path like /path/to/my/site/*.rb doesn't exist.

A secondary annoyance is that jekyll itself uses File.fnmatch? for checking if a path should be excluded, whereas Listen (I believe) uses regular expressions :(. This means that our build exclude and our watch exclude don't match properly.

My proposal is to keep what we have, add a section to the README explaining how jekyll-exclude only accepts some of the entries in our configs exclude section (exactly those for which a valid file exists) & add a new section to our configs watch_exclude consisting of regular expressions like "^\.jekyll\-metadata!" which we simply include in our ignore list altogether. This probably means there'll be some overlap between watch_exclude and exclude... but it's better than outright ignoring most of our exclude values.

A better solution would be somehow converting fnmatch paths to regular expressions or requesting that the Listen library uses fnmatch for strings and regular expressions seperately (like jekyll does at the moment).

Won't Actually Bundle wdm

As @ixti tells me, the gemspec is compiled to YAML at build time. Since I
release everything on my Mac, wdm will never be bundled.

BARNACLES

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v2.2.1.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

Update dependency constraint to allow for rubocop-jekyll v0.11.0

Hey there! 👋

I noticed that the constraint you have for rubocop-jekyll doesn't allow for the latest version to be used.

The constraint I found was ~> 0.10.0, and the latest version available is 0.11.0.

Can you look into updating that constraint so our users can use the latest and greatest version? Thanks! 💞

Do not watch .jekyll-cache

Current Jekyll master has a new caching system that stores files in a .jekyll-cache folder

Given I run `bundle exec jekyll serve --incremental`
When I modify a single file
Then I get the following log:
Log for a single modification Regenerating: 1 file(s) changed at 2018-10-03 18:15:14 _drafts/2017-06-22-guide-jeune-intermittent.md

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.870
feed.xml | 1 | 166.45K | 0.832
_layouts/redirect.html | 1 | 0.56K | 0.000
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000

                ...done in 2.195681 seconds.

  Regenerating: 27 file(s) changed at 2018-10-03 18:15:17
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/0b/c3f8fcb779fa94de21a3754eb576daf3a5751ac9e170284180a827b1b0e3dd
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/d1/9adede8bc605e3bc6d0eaa5c5f987c59da4130d5067cafb05bbf711a7bda1d
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/d6/461fed682a7575e0dfbf28818c351ec3f5ee7c46ad673393185153e7bfc9c8
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/f2/b166792a0451d1842d815658dda38d6755a33fe767dd9aa81c47e31f8e726f
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/89/255ba377974d68bfdfcc1aa4be40a579feca3d8ae1da39562bee778e48530d
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/86/277642ec1d3d1538d0966bfc077c6a715d164eb39f0f9003659fab19af2ae7
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/6d/8e913f60dfacdb2f34e658f04e93e8ac4664a9c4ebc6abceaa03775d315816
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/bf/00b596f3940cee25bab6c99a2d020bba90352064921ff048817c83d8d469ce
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/aa/e7e54585719ee36112819fca6b91d7b0fffa20d05aa067de8d64ac709a2108
                .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/79/4e1b9d77557973ccb5a7a5231230af1044a7cf093beed037443e7446b1fbea
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/0b/c3f8fcb779fa94de21a3754eb576daf3a5751ac9e170284180a827b1b0e3dd
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/da/2a41c558c5846b69dc0d00bc521ac6b6cd55dde5e10a279bdce2d5c4d97c43
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/d1/9adede8bc605e3bc6d0eaa5c5f987c59da4130d5067cafb05bbf711a7bda1d
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/d6/461fed682a7575e0dfbf28818c351ec3f5ee7c46ad673393185153e7bfc9c8
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/c7/40954949dad827d2e9c2b8d0abf9e183328c95493559d5801469a7f8f1bd55
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/f2/b166792a0451d1842d815658dda38d6755a33fe767dd9aa81c47e31f8e726f
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/e3/b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/89/255ba377974d68bfdfcc1aa4be40a579feca3d8ae1da39562bee778e48530d
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/86/277642ec1d3d1538d0966bfc077c6a715d164eb39f0f9003659fab19af2ae7
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/6d/8e913f60dfacdb2f34e658f04e93e8ac4664a9c4ebc6abceaa03775d315816
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/bf/00b596f3940cee25bab6c99a2d020bba90352064921ff048817c83d8d469ce
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/aa/e7e54585719ee36112819fca6b91d7b0fffa20d05aa067de8d64ac709a2108
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/79/4e1b9d77557973ccb5a7a5231230af1044a7cf093beed037443e7446b1fbea
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/12/0d5a438f0665877bfa6ac8dc6c79872c237e81d11a155d4facfc603bc99a5e
                .jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/a1/39e125f7b72d485ec645425588bb8497022e0579b66ea57d1308abec4b43c6
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/ca/f49b2b73abfc213a70dfa3dc06584c60df591523116d013bb4794917572561

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 1.008
feed.xml | 1 | 166.45K | 0.583
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.082989 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:19
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/a4/2fbe6c0901b869bf3940cb5bcf0e46a2e536cbfabb7f17f3b577d9c085af39

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.950
feed.xml | 1 | 166.45K | 0.660
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.27022 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:21
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/df/fca96b2a5dddd5ff3bdc3570e190a241c4627fd7b794cf41b6d542aa6fe06d

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.917
feed.xml | 1 | 166.45K | 0.619
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.162198 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:23
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/17/114135169e6d68e05868388f9e40dc2fa0b77b086b321f23ca5a0ba6bf380d

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.908
feed.xml | 1 | 166.45K | 0.661
_layouts/redirect.html | 1 | 0.56K | 0.001
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000

                ...done in 2.170326 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:26
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/1d/28c07e316bb690d049c9d66777cc54cae4d1b4cf9f24c86a74b2c5f4c52a6b

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.915
feed.xml | 1 | 166.45K | 0.624
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.213444 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:28
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/f7/ad44ab2578316593534b0bc5ec62624047eedd47f6ee3ced3d17188140afd7

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.984
feed.xml | 1 | 166.45K | 0.840
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.001
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.366444 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:31
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/de/3751b907d47359e6a0eda46c9ae07f0f9d80f07e232e817eebe9349f5cd5ea

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.947
feed.xml | 1 | 166.45K | 0.842
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.190241 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:33
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/94/40cf759fda1c38cac1e654c317da954809c5f6f29c43dde01bffd867661177

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.951
feed.xml | 1 | 166.45K | 0.673
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.166531 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:35
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/66/361693226c99cec9dfc1f2b8249f1ae0805f7641059b1a3b3473e8039299dc

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.929
feed.xml | 1 | 166.45K | 0.611
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.001
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.064852 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:37
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/3c/fae14c19cb929db639cc797850720ad64cc91ad77e6b7a2ba15adf5bab520f

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.943
feed.xml | 1 | 166.45K | 0.714
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.067206 seconds.

  Regenerating: 1 file(s) changed at 2018-10-03 18:15:39
                .jekyll-cache/Jekyll/Cache/Jekyll--Renderer/09/64538786d477e8dcfe76556b9a435f9530a07f4cbbc671a2219c85f4f15ad1

Filename | Count | Bytes | Time
-------------------------------------------------------------------------------------+-------+---------+------
sitemap.xml | 1 | 4.17K | 0.945
feed.xml | 1 | 166.45K | 0.665
_posts/2018-05-21-non-les-design-systems-ne-remplacent-pas-les-designers.md/#excerpt | 1 | 0.47K | 0.000
_layouts/redirect.html | 1 | 0.56K | 0.000

                ...done in 2.281311 seconds.

Workaround

Add .jekyll-cache to excluded files in config.

Time for a new release

Hello, maintainers! 👋

By my calculations, it's time for a new release of jekyll-watch. It's been over 2 months since the last release, v2.0.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! 💞 ✨

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.