jekyll-assets
jekyll-assets copied to clipboard
Ignore certain files
- [x] This feature is not on the latest version
Request
I want to be able to ignore sertin files from the asset pipeline.
Examples
For expample I have a folder where images are located together with some JSON metadata. The metadata ends up in the asset dir. I want to be able to ignore certain file by specifying a settting like: ignore: "*.json" or `ignore: "samples/*.json"
We don't compile, or process, or even check for anything you do not explicitly request via our helpers. So there is no need to ignore any files, because even if stuff you do wish to include is inside of folders full of stuff you do not wish to include, we will not notice, or care about the files you don't ask us to process. Can you further elaborate your use case or why?
Yes, I'm building a "scafolding" (or a framework or whatever you want to call it) for people to do step by step instruction. The instruction details are specified in json files and later put together by jekyll. An instruction can have an image associated with it. For the purpouse of the framework I require users to add an image with the same name as an instruction step. This way they can easily track that everything is ok. (As soon as I will move images into another dir someone will 100% misstype one lettsr and start complaing). jekyll-assets is super nice because I don't have to care about the format of the image or whether it is present. But as the JSON files are used to construct the website they are also move to the assets folder (which is not totaly bad, but it is definetely unneeded).
Another use case ... consider a git repo which contains the _config.yml file, _posts/ directory, and so forth ... in the root of the repo. I'd like to have a README.md file in the root of the repo, so that when somebody looks at that repo in Github or some other web interface, I'll have a way to explain how to set up Jekyll on their workstation and what the normal workflow looks like ... without that README.md becoming part of the generated site.
Unless the "standard" way to use Jekyll is to have the "Jekyll root" (where the _config.yml file is) be a sub-directory within the git repo, and that's just not clearly explained anywhere?
Update: after leaving the comment aboive I found that, if I use the word "exclude" instead of "ignore", the search results are a LOT more helpful, and they pointed me to the documentation.
I just added the following to my site's _config.yml file:
exclude:
- README.md
... and now when it generates the site, it doesn't include the README.md file in the output.
This solved the problem I ran into, maybe it can solve this issue as well?
Also, it might be useful to find a way to add the word "ignore" in the documentation when talking about the exclude list, to make it easier for people who happen to choose the wrong word when searching for information about this.