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
Excluding subdirectory from being generated #906
Comments
Use |
@Apathetic012 you can also put the directories / files you want to exclude in an array like |
@Apathetic012 Add this in your config.yml file and see if it does it:
More info on Jekyll Configuration Settings Wiki Alternatively, if possible, just add an |
@aahan I tried that as well. No dice |
I had the same problem just a couple of hours ago. Adding an underscore is no option (e.g. for IMO there are at least two problems with
|
@jwebcat Well, we already did, didn't we? And I agree with you. I am starting to see a couple of things, not working as described in Jekyll docs (for example). |
@aahan agreed :) as we would obviously like to have the same name for multiple different locations as with what-a-page as @stomar points out this kind of seems like a no-brainer that it should be an option. Or at the very least we could know how it is done, although I have tried every possibility I could think of with no dice. |
I believe the current "options" are:
🙀 |
I guess my last resort for now is to prepend an underscore to the directory. |
@parkr any chance this is coming with the next release? |
@Apathetic012, do you use stable or beta? I use the same structure as you, ie: |
@gummesson my version's EDIT: I updated to |
@Apathetic012, as long as you do not have another file/directory |
I think the issue should be kept open. |
@stomar I agree this seems like a no brainer. It's almost pointless to attempt a PR as almost all new features are bring shot down by the elders in charge of Jekyll with the excuse that it will make Jekyll too complex. ... it seems like we're in a kind of waiting zone until new features are ok'ed by @mojombo . I know there are a lot of things to take into account with each new feature request. Other wise I guess we can make a fork that will be more conformist to obvious public needs and features requests, instead of some kind of personal blog project that github happens to be using for hmm pages, and everyone is using and contributing to. incremental regeneration for example is one thing I flat out need if I see myself using Jekyll much longer. Anyone... thoughts? |
I can confirm the following:
We intend to update the documentation before 1.0.0 is released. If you'd like to accelerate the release and reduce your frustration, I highly suggest helping out to make the docs match what is implemented. The help would be gladly welcome. You may also submit a pull request for the particular behavior you want and we can discuss what the desired functionality should be. In the meantime, I've adjusted the wiki page to remove the comment about the trailing slash, since it doesn't apply |
@mattr- wonderful 👍 I am more than willing to help update the docs.
|
I'm just guessing but the behavior of The documentation is not clear about the precedence of |
1.0 betas support glob exclusion. |
@parkr include behaves the same then I imagine right? |
I believe so. |
@parkr cool. I will test it. I Would love your opinion on this rakefile I made for Jekyll https://github.com/jwebcat/rake-jekyll-grunt.git it uses grunt and live reload. My ruby is super basic and I imagine could be improved. |
Any thoughts on how I should exclude only a root directory or file. exclude:
- vendor Ignores all
Thoughts? |
Did you try vendor/* ?
|
Just tried, no dice. |
You could always do _dir
|
Yeah that solves my problem, but I thought I would bring up that this type of matching doesn't work. I would have expected it to work much like gitignore. For now I'll use underscores. |
I guess it's supposed to be used for glob ignores like assets/*/.js
|
As I already stated 6 months ago, I still think there should be a way to exclude |
Agreed
|
should fix HTML::Proofer build errors: https://travis-ci.org/github/choosealicense.com/builds/15327469
Glob ignores don't seem to work in 1.3.1. With the directory
Any other workarounds / fixes for nested excluded directories? |
Use an underscore
|
In the name of the directory like _js Jekyll will ignore all directories prepended with underscore.
|
In case this helps anyone else, I was having trouble getting Jekyll to exclude Grunt generated files and directories without an underscore. I thought there was something wrong with my syntax, but when I restarted Terminal after editing the config file, it finally worked. Here's what my exclude looks like:
|
bit surprised that this is still an issue after a year. |
It's fixed in 2.0 On 16 April 2014 03:39, Evert Pot notifications@github.com wrote:
|
Thank you, that's good to know! |
I format my excludes this way. Doesn't matter as long as it's yaml. The behavior is the same. I use a few keywords to ignore directories because Jekyll doesn't support glob in excludes. It'll be cool when 2.x comes out and adds that though.
|
Hello. I am from the future, specifically February 2015. This issue is still not resolved. It is possible to exclude a folder by putting its exact name in the exclude. If the folder's name is, say, xyzzy, you can put If you say xyzzy/foo.bar, it appears that you cannot exclude just foo.bar. If you say xyzzy, not xyzzy/, the folder will be excluded and so will any file (and folder?) containing the string 'xyzzy', such as article-about-xyzzy-magic-word.md File watch does not interpret the things in exclude the same way that jekyll generation does. It is possible to set things up so that watch will not trigger but jekyll will generate the file if started manually. I believe it is possible to do the reverse. There are essentially zero working examples anywhere. I would wager that there are no working tests or checks as well, since if there were someone would surely have published them by now. This is not the end of the world. I'll write to you about that later. But it is not particularly good nor impressive. |
+1 to what @RonJeffries said... this issue seems to have re-appeared. I have been using the following include configuration for the past 6 months to ensure that the entire contents of my include:
- "sass/_*" The only way I can get the underscored files / directories in my include:
- "_*" This is sub-optimal, however, because it now copies the entirety of @parkr @mojombo should a new issue be opened - or is this issue still an appropriate place to investigate possible regressions? Using jekyll Thanks for your time. |
I am strugling with this as well, with Jekyll 2.5.3. I have a I tried several syntaxes, from the comments in this thread, with no result. |
I wanted to exclude assets/sass from being included into the generated
_site
:However it still includes
assets/sass
. I tried adding a trailing slash, putting it inside quotation marks but none works?The text was updated successfully, but these errors were encountered: