Customising Github profile pages

11 Jul 2020

git  Python  Web 

I saw a blog post recently by Simon Willison that shows you how to use a somewhat hidden feature of Github (as in it seems well known on the internet, but it’s not in their docs). Normally, a Github profile just contains either a random set of repositories, or you can pin particular repositories if you want. However, it turns out there’s an extra hidden feature: if you have a repo with the same name as your username (e.g. palfrey/palfrey for me) and it has a README.md, that will get displayed at the top of your profile.

This gets you custom content, but it’s still Markdown, so if you want something more dynamic, no such luck. Except, then you can do some fun stuff with Github Actions and get it to automagically regenerate the text every so often, and so at least get something dynamic for slow-enough items.

I’ve decided to go with the most recent blog posts from here plus my most recently merged Pull Requests as those seem about the most useful items I can show there. Mostly I cobbled together bits from Simon’s existing repo as it had a really good existing structure, and I just changed the set of data it was pulling from and changed the text a little for my own uses, but it owes a lot to his existing work.

I could do some other stuff (e.g. add a view counter) but I haven’t yet thought of anything specific I feel strongly enough about, although if I get bored enough I may try messing around with the Zalgo text and see if I can really break a Github profile page.

Previously: Celebrating 100,000 downloads of serial_test Next: Scraping Lewishams bin days