I’m searching for an elegant way to create a couple of sets of pages with Jekyll, based on a collection of posts; tips in my case. I’m struggling with how to create the layouts/pages to generate those additional sets of pages. I’m not sure whether it’s possible with Jekyll-out-of-the-box, or whether I need to use a plugin or code/configure something myself.
First, this is my (pretty standard) setup:
- Every tip is (contained in) one post.
- Every tip has one publication date.
- Every tip has (belongs to) one category.
Next to the generation of the standard set of pages - this is already done - at
/:category/:year/:ordinal/title.html
I want to create two more sets of pages based on the same collection of posts.
One, a category ‘index page’, for example at
/:category/index.html
that contains the list of tips for that category.
Once I know how to generate that page, I can code the logic to include the tips for that category. The category folder is generated (per the default) but it doesn’t contain an index page, and I don’t know how to let Jekyll generate that automatically.
Two, a ‘this day’ page, for example at
/:year/:ordinal/index.html
that contains the tips for that day.
Once I know how to generate that page, I can code the logic to include the tips that should be shown for that day. It’s an additional set of pages ‘outside’ the standard pages that are structured by category.
So, the question is not how to code the individual pages or layouts, but how to configure / setup the structure(s) so that those pages will be generated automatically by Jekyll.
Thanks!