Split Collections in Jekyll
One thing I love most about Jekyll is its extensibility. I can customize it however I want. It feels like the perfect balance between it just working out of the box while sitll allowing the ability to make it fit your needs.
Today, this was my need:
- I write at least two types of posts here.
- One is long, well thought-out posts that I spend a few days drafting. Like my Engineering Recruiting post.
- The second is quick notes that I'd like to share, but they're not as important as the long posts I write.
- It didn't seem right that those short posts would be more prominent than the long posts.
- So I wrote a Jekyll plugin that lets me split up posts into two categories -- full posts and notes, by adding tags: note to the post.
Here it is. Put it in your _plugins directory:
I had to do a bit of reading to figure out how the Collections API worked, but once I had that figured out, the rest was easy.