This post was
heavily inspired more or less copied from Joe Kampschmidt’s post How to list your jekyll posts by tags.
In his post, Joe shows how to create a list of posts sorted by the tags which they appear in. I wanted to achieve the same but instead listing by category rather than tag. I prefer categories as they are added into the URL when generating your site which I think is better for organisation (see here for the differences).