#9879·jekyll

[Bug]: Wildcard patterns in `exclude` don't work for collection files

Author: tillahoffmannCreated Oct 2, 2025Updated Aug 24, 2026
Labelshas-pull-request

Operating System

macOS 26.0.1 (25A362

Ruby Version

ruby 3.4.6 (2025-09-16 revision dbd83256b1) +PRISM [arm64-darwin25]

Jekyll Version

jekyll 4.4.1

GitHub Pages Version

No response

Expected Behavior

Wildcard exclude patterns should work consistently for both collection files and regular files.

Current Behavior

  • Wildcard patterns (e.g., **/nooo) successfully exclude matching paths in regular directories
  • The same wildcard patterns fail to exclude matching paths within collections
  • Explicit non-wildcard paths (e.g., _articles/two/nooo) work correctly for collections

Relevant log output

Code Sample

Given this _config.yml:

exclude:
  - "**/nooo"
  - _articles/two/nooo

collections:
  articles:
    output: true

With this directory structure:

  • _articles/one/nooo/unexpected.md ❌ Not excluded (should be excluded by wildcard)
  • _articles/two/nooo/unexpected.md ✅ Correctly excluded (explicit path)
  • items/one/nooo/unexpected.md ✅ Correctly excluded (wildcard works for non-collections)

Full reproduction repository: https://github.com/tillahoffmann/jekyll-exclude-example/tree/main