Closed philectron closed 8 years ago
I don't think you can easily do this. Check out this thread on the Jekyll Talk forum for more info.
But essentially _posts
has categories
and tags
support, while other collections do not. I'm sure it will eventually get addressed since posts are just another collection, but for now you're out of luck.
There may be a plugin out there that could do it, but guessing you're hosting on GitHub Pages which won't help you... since they're not allowed.
You're right. Only _posts
has categories
and tags
support. I'm probably out of luck for now. Thank you!
@mmistakes I'm glad that I searched, I was about to open a new ticket asking the same question. Almost 2.5 years have passed since this ticket was created, does the limitation on collections still exist? BTW, the link you referred to above no longer exists.
@asarkar Yes still a Jekyll limitation. There is a proposal for the next major version of Jekyll to harmonize collections if you want to weigh in.
https://github.com/jekyll/jekyll/issues/7296 https://github.com/jekyll/jekyll/issues/7202
bundle update
.bundle exec jekyll build
.Environment information
github-pages
orjekyll
gem version: jekyll 3.1.6Expected behavior
I assigned the same category for two posts. I set one post in the
_posts
folder, and the other post in the_my-collection
folder. I have already setup the declaration and front matters formy-collection
:I expected that once I go to
/categories/
, I should see two posts appear at the same category list.My Issue
However, I didn't see the post in
_my-collection
appear in the list but only the other post in the_posts
folderI use your category-archive.html layout.
How should I edit the code so that it would search in
_my-collection
also? Thanks!