jekyll: [Bug]: `include` option ignores folders
Operating System
Windows 11
Ruby Version
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x64-mingw32]
Jekyll Version
jekyll 4.2.2
GitHub Pages Version
No response
Expected Behavior
Given this source folder:
excluded/
included/
this-file-should-be-included
_config.yml
with this _config.yml
:
exclude:
- excluded
include:
- excluded/included
When running bundle exec jekyll build
, I expect the following output:
_site/
excluded/
included/
this-file-should-be-included
Current Behavior
The current implementation produces an empty _site
folder.
Note that if the include
option points to the file explicitly, the file is included as expected
Relevant log output
No response
Code Sample
Steps to reproduce issue
- Clone jekyll-config-include-folder-repro
- Install site dependencies
- Run
bundle exec jekyll build
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 20 (5 by maintainers)
I accidentally stumbled upon the solution.
Case 1
My folder structure looks like this:
The working config specifies the relative path from the
_posts
folder, not from the project root directory (which is a weird behaviour that should be changed).Case 2
folder structure:
config:
Edit: updated to add more specific cases
It sure does love to come mark this stale. I worked around it though with this to dynamically populate the include list everywhere there was a
.nojekyll
file. Which isn’t great, but it works for me to get around this issue until it’s fixed.Not stale!