Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Files inside a collection folders are put in _site/ root #6410
My Reproduction Steps
I am normally putting my doc assets beside the doc itself and I used jekyll postfiles plugin to handle assets of my posts and I had no problem. Recently I started to use jekyll collections too and I wanted to do the same approach (putting assets beside collection docs). I tweaked that plugin a little bit and its working exactly as I want. However I have a problem. All of the assets inside collection directory also are copied in the _site/ root directory. This doesn't happen for the assets beside my posts. And I think it isn't the intended behavior. So I guess its a bug?
I would be very happy if its fixed.
The Output I Wanted
Preferred output is to not copy collection files to site root and let the plugin handle where they should be. This is the normal behaviour for files that are in _post directory as far as I know. And _post is some kind of collection.
@parkr I have already done that:
The problem now is not the plugin, as it is working perfectly. The problem is that jekyll itself puts all assets inside collection folders in the root folder of the site. So it means all collection assets are in two place. 1- beside the rendered html (as intended by the plugin), and 2- in the site root.
Ok so I found the snippet of code in jekyll which is responsible for handling files inside collection folders in
According to this, all files inside collection folder, no matter where exactly they are, are copied in a folder based collection template url.
This issue has been automatically marked as stale because it has not been commented on for at least two months.
The resources of the Jekyll team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the
If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.
This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.
Please refrain from asking questions related to
will render into: