jekyll/jekyll

[Bug]: livereload-ignore option doesn't work

wlabarron opened this issue · 2 comments

Operating System

macOS 14.1.2

Ruby Version

ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]

Jekyll Version

jekyll 4.3.2

GitHub Pages Version

No response

Expected Behavior

After specifying ^\.wrangler\/ in the livereload-ignore config parameter or the --livereload_ignore command line argument, files changing in the .wrangler directory should not trigger a live reload when running bundler exec jekyll serve --livereload.

Current Behavior

Files changing in the .wrangler directory trigger a live reload, and the verbose output shows that .wrangler is not making it to jekyll-watch for ignoring:

         Requiring: jekyll-watch
           Watcher: Ignoring (?-mix:^_config\.yml)
           Watcher: Ignoring (?-mix:^_site\/)
           Watcher: Ignoring (?-mix:^package\.json)
           Watcher: Ignoring (?-mix:^package\-lock\.json)
           Watcher: Ignoring (?-mix:^README\.md)
           Watcher: Ignoring (?-mix:^\.jekyll\-cache\/)
           Watcher: Ignoring (?-mix:^Gemfile)
           Watcher: Ignoring (?-mix:^Gemfile\.lock)
           Watcher: Ignoring (?-mix:^node_modules\/)
 Auto-regeneration: enabled for '[project path]'
LiveReload address: http://127.0.0.1:35729

Relevant log output

No response

Code Sample

No response

This can be worked around by putting the path to ignore in the exclude config parameter, but will mean that path is also not considered when building the site.

I encountered this bug on Windows 10 with Jekyll 4.3.3. I used this configuration setting in _config.yml:

livereload_ignore: [ /assets/images/qrcodes/* ]

When my generator writes files into /assets/images/qrcodes/*, a reload is triggered. I need these files to be part of the site, so I cannot exclude them. Thus, the workaround suggested by @wlabarron is not an option.

Please fix this bug.