Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include configuration syntax for hidden folders #7951

Closed
assombrance opened this issue Dec 26, 2019 · 8 comments · Fixed by #8113
Closed

Include configuration syntax for hidden folders #7951

assombrance opened this issue Dec 26, 2019 · 8 comments · Fixed by #8113
Assignees
Labels
bug frozen-due-to-age good first issue 🥇 Easy pick to make your first contribution has-pull-request Somebody suggested a solution to fix this issue

Comments

@assombrance
Copy link

assombrance commented Dec 26, 2019

Motivation

Hi, I've struggled (like a lot of persons it seems) with setting up github pages with shpinx. In particular, the way include works on folders/subfolders.

To solve the problem, I went to the documentation and looked how it was done in the default configuration here. And either the syntax is not the same for include or exclude, either there is a typo in the documentation:

To exclude a folder, it seems like one needs to write:

exclude: ["folder_name/"]

But it did not work to include a folder (specifically a folder starting with an underscore).
After some testing and looking around, I found that the syntax for include seems to be:

include: ["_special_folder_name"]

Suggestion

It is quite frustrating to have to guess that I find. Maybe an update of the documentation would be needed ?

A great way to improve the doc would be to give examples, at least for that case, but also maybe for and command/option (the default configuration is quite helpful for that, but it wasn't enough for me this time).

Thanks !

@DirtyF
Copy link
Member

DirtyF commented Dec 26, 2019

Thanks for reporting.

Looks like a bug to me, I manage to reproduce it:

Given I have a _pages folder containing a 404.html file
And I have includes: _pages/ in my _config.yml
When I run jekyll build
Then 404.html is not generated in the destination folder.

Works fine if I remove the ending slash in the includes directive.

@jekyll/build any idea why this discrepancy here?

@DirtyF DirtyF added good first issue 🥇 Easy pick to make your first contribution help-wanted and removed documentation labels Dec 26, 2019
@kartikcho

This comment has been minimized.

@DirtyF
Copy link
Member

DirtyF commented Dec 30, 2019

includes and excludes should work the same, it shouldn't matter if you add the trailing slash or not.
So I would say the latter, with associated configuration tests . 🙏

@DirtyF DirtyF assigned kartikcho and unassigned DirtyF Dec 30, 2019
@DirtyF DirtyF changed the title docs: Include syntax unclear Include configuration syntax for hidden folders Dec 30, 2019
@kartikcho
Copy link

kartikcho commented Dec 30, 2019

It seems this is not a mere documentation issue and I'm not familiar with the codebase so this could take long for me. I'm sure someone else would fix it faster than me. Sorry @DirtyF

@kartikcho kartikcho removed their assignment Dec 30, 2019
@jekyllbot jekyllbot added the stale Nobody stepped up to work on this issue. label Mar 1, 2020
@jekyllbot

This comment has been minimized.

@billykong
Copy link
Contributor

billykong commented Apr 11, 2020

Hi @DirtyF, I would like to work on this issue if you don't mind. I have been reading through the code yesterday and I believe I have an idea how to fix this issue.

It would be my first issue and will probably take a week for me to submit the first pull request.

@jekyllbot jekyllbot removed the stale Nobody stepped up to work on this issue. label Apr 11, 2020
@DirtyF DirtyF removed the accepted label Apr 11, 2020
@DirtyF
Copy link
Member

DirtyF commented Apr 11, 2020

👌 Thanks for offering your help @billykong, feel free to open a draft pull request, expose how you want to solve the problem before implementing it if you need any guidance.

@jekyllbot jekyllbot added the has-pull-request Somebody suggested a solution to fix this issue label Apr 13, 2020
@billykong
Copy link
Contributor

Hi @DirtyF, thank you very much. I have linked a draft pull request to this issue. The implementation is there since doesn't involve much code. Feel free to comment or modify it as you see fit.

@jekyll jekyll locked and limited conversation to collaborators Apr 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug frozen-due-to-age good first issue 🥇 Easy pick to make your first contribution has-pull-request Somebody suggested a solution to fix this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants