Skip to content

Fixing incorrectly excluded paths#9945

Open
seroperson wants to merge 2 commits into
jekyll:masterfrom
seroperson:i9116-include-priority
Open

Fixing incorrectly excluded paths#9945
seroperson wants to merge 2 commits into
jekyll:masterfrom
seroperson:i9116-include-priority

Conversation

@seroperson

Copy link
Copy Markdown

This is a 🐛 bug fix.

Summary

Fixes cases when exclude excludes directories which are declared in include:

exclude:
  - private
include:
  - private/assets/images

Now output directory will contain private/assets/images.

Context

Closes #9116

@afurm

afurm commented Apr 14, 2026

Copy link
Copy Markdown

The glob_include?(site.include, entry)glob_include?(site.include, relative_to_source(entry)) change in included? looks correct, but there's a subtle interaction: relative_to_source(entry) is also called inside excluded? — if entry is already a relative path, calling relative_to_source again on it could produce an incorrect path (e.g., foo/../bar vs bar). Has this been tested with entries that already have partial source-relative paths?

For example:

```
exclude:
  - private
include:
  - private/assets/images
```

Now output directory will contain `private/assets/images`.

Closes jekyll#9116
@seroperson seroperson force-pushed the i9116-include-priority branch from d65cefd to db83f8e Compare April 15, 2026 11:28
@seroperson seroperson force-pushed the i9116-include-priority branch from db83f8e to edeb0d9 Compare April 15, 2026 11:44
@seroperson

Copy link
Copy Markdown
Author

The glob_include?(site.include, entry)glob_include?(site.include, relative_to_source(entry)) change in included? looks correct, but there's a subtle interaction: relative_to_source(entry) is also called inside excluded? — if entry is already a relative path, calling relative_to_source again on it could produce an incorrect path (e.g., foo/../bar vs bar). Has this been tested with entries that already have partial source-relative paths?

I've added a specific test for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: include option ignores folders

2 participants