jekyll / jekyll/jekyll

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

Open
#9,879 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

has-pull-request
Dominant language
Ruby
Stars
51.7k
Forks
10.3k
Avg merge
23m
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied reproduction repository and its _config.yml, focusing on how the exclude patterns are applied to _articles collection paths versus regular items paths. Compare the wildcard and explicit-path cases, then verify that _articles/one/nooo/unexpected.md is excluded while the existing regular-file and explicit collection exclusions still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.