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
Setting Collections Relative Directory: Right Approach? #2518
Comments
This is a really thorny issue. I feel like the more we allow everything to be configurable, the more we diverge from GitHub Pages and the more confusing life becomes for newcomers. This starts to feel like we're really working to separate all content from the code/styles which is generally good, but it feels like a 🐰 hole that I just don't want to venture down quite yet. Thanks for the idea though! |
very well. maybe something for me to lobby for in the 3.0 discussion |
Please do! :) |
I think something like this should be considered for Jekyll 3.0. Separating the site code from the content is important. If we can't have proper themes (think @imathis's Octopress Ink), then we could offer something like this so at least content could be encapsulated into one folder. The last piece seems to be |
I have a use case where it would be very helpful to be able to configure the path to a collections source files. I work on a Jekyll-based site where the assets are published to npm. So the css file for instance is linked from |
Allowing a collection's directory would also be quite helpful for internationalization (i.e. multi-lingual sites). There are a few plugins out there (jekyll-multiple-languages-plugin,jekyll-i18n) that function well for posts and pages, but do not support collections. I suspect the lack of support is largely due to the inability to specify a collection's relative directory. |
I'm gonna try and get this out by 3.0, no promises though. I ran into this issue today and I was bummed out that it didn't work like that out of the box. |
Anyone have time for this? |
👍 for this functionality. Like @budparr, I'm also trying to organise my collections so it's easy for editors to know which files to edit. |
Would love this functionality, I also have many collections that I just want to group into subfolders for cleanliness. I've just patched one line in jekyll to allow a collection's If this is acceptable, I can try to do tests and documentation (like the contributing page says), though this is my first time using Ruby, so if anyone wants to help that'd be great. |
Alright, I've added documentation and tests (though I am unsure if the tests are rigorous enough). In
The resulting collection
If you think this modification sounds OK, I'll go ahead and submit a pull request. On that note, the jekyll documentation says |
We won't know if they are OK until you send a pull request, if you feel that your code is suitable (and to me the idea sounds suitable) then please do submit a PR if you would like and we'd be happy to take a look at the code (I know I won't go digging through your repo to find the code, it's much easier to look at the PR's code.) |
See: #3723 |
Closing this now that we have #6331 : users can store all their collections in a folder relative to the source dir with |
This discussion is related to a PR I made to set a configuration variable for a Collection's location in the directory structure. I'm putting it here in an issue to open a broader discussion, if anyone cares, about the best approach to this.
Currently, a Collection's "relative_directory" is set to the Collection label. The documentation is a bit confusing here, because one can apparently access the relative_directory, but not configure it.
I believe it will be better for users, including content creators, to optionally organize their collections into a folder or folders.
So, is it best to be able to set each Collection's directory, or set all Collections' directory, or set aside (thinking of a previous conversation on this) the _includes and _layouts folder so everything else is content?
I've been trying to shove most of my content into a _documents folder and with a bit of finagling (setting permalinks) I can get them to render where I'd like.
Ideally there'd be a way to have a lot of control over the directory structure to keep it organized.
Thoughts appreciated.
The text was updated successfully, but these errors were encountered: