As suggested here, I want to use all my collections inside a subdirectory. I wanted to test this feature by putting this inside my _config.yml file:
then I have
mycollections subdirectory as follows:
However this file isn’t rendered in my jekyll.
What does the rest of your collection configuration look like? What you have above isn’t enough.
My understanding is all
collections_dir is allowing you to do is to place all your collections in a subfolder. So instead of:
│ ├── some-file.md
│ └── another-file.md
│ ├── 2-some-file.md
│ └── 2-another-file.md
│ ├── 3-some-file.md
│ └── 3-another-file.md
You can clean things up with:
│ ├── _collection1/
│ │ ├── some-file.md
│ │ └── another-file.md
│ ├── _collection2/
│ │ ├── 2-some-file.md
│ │ └── 2-another-file.md
│ ├── _collection3/
│ │ ├── 3-some-file.md
│ │ └── 3-another-file.md
That said you still need to configure each collection as you normally would by setting each to
output: true and whatever permalinks you want. What you have above looks to be trying to apply a default config to all collections, which I don’t think Jekyll currently supports.
Ok so I changed my _config.yml to the following
but still my collections aren’t rendered. The interesting part is that if I remove
_book, the markdown files are treated normally like a page. So I think the
collections_dir isn’t configured properly yet?
Have you already used this feature successfully? If not I think maybe there is a bug out there.
Nope. Haven’t used
collections_dir yet. Seeing how it’s not officially released wouldn’t surprise me if there’s issues with it.
Your best bet is to file a ticket on jekyll/jekyll.
I think there’s an error in the official docs… from the souce code it looks like
collections_dir is a top-level key instead of being nested within
So, if your
Gemfile is pointed towards the jekyll repo
master, then change your config file to following and try again…
Yes. Thank you very much for your help.