Some time ago, while building open-source publication site for Genics Blog, I found that jekyll can’t support multiple authors out of the box. Though it could be achieved by a simple hack of adding author data to a data file and using a layout for authors to render that data.
But this included manual hassle for writing a 2 line markdown file for each author, that has front matter for layout and author username which will be used for fetching data. Also, those pages won’t be paginated. This can increase load time if there are lots of posts each with a thumbnail image.
This manual hassle lead me to explore more about
jekyll-paginate-v2 because the auto pages feature it had was exactly what was intended for author pages as well.
After 3 days of exploring the codebase, learning enough ruby, and messing around I figured out that adding author pages can be simplified.
I ended up making the plugin
jekyll-auto-authors which simplifies the complete process. After one time setup for layout and config, adding new authors is as easy as adding
author: username to the post, and defining author data if necessary.
The plugin auto-generates author pages along with pagination. The setup instructions are there on the GitHub readme.
The only caveat is, one needs to install jekyll-paginate-v2 alongside because this plugin depends on utility functions inside it, and overrides the pagination logic. Seeing that the
jekyll-paginate-v2 plugin isn’t receiving updates and Issues and PRs have become stale, I decided not to create PR for author autopages there, and creating a v3 fork plugin didn’t seem worth it.
The plugin doesn’t affect the working of jekyll-paginate-v2, but works in sync together. It is doing well for Genics Blog so I wanted to share it here with all! I saw that people were finding ways for adding multiple authors from many years, saw stack overflow questions from 2012, 2014, 2018, etc. (links to them in readme) so this could help them as well!
Thanks for taking time to read about the plugin!