Creating additional pages from single set of posts

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!

jekyll does not do this for you on its own. You either have to make your own page for each category do it yourself or use a plugin.

Check this one and see if it works for what you want: GitHub - jekyll/jekyll-archives: 📚 Archive pages for your Jekyll tags and categories.

1 Like

Thanks. From the looks of it, that plugin seems to address both requirements: category index pages and date-based index pages. (Now I hope it honors the ordinal date permalinks that I have set up :slight_smile:

I’ll check it out! Thanks again.